From b335c878e223a3972258f838d08a420cd53b7770 Mon Sep 17 00:00:00 2001 From: Hugo Date: Mon, 28 Oct 2024 16:28:51 -0300 Subject: [PATCH 1/5] =?UTF-8?q?feat(new=20variables):=20=F0=9F=9B=A0=20=20?= =?UTF-8?q?Adds=20new=20analytics=20variables=20for=20Navegg=20vendor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ads/vendors/navegg.js | 5 ++++- ads/vendors/navegg.md | 2 +- extensions/amp-analytics/0.1/test/vendor-requests.json | 2 +- extensions/amp-analytics/0.1/vendors/navegg.json | 2 +- src/service/real-time-config/callout-vendors.js | 4 ++-- 5 files changed, 9 insertions(+), 6 deletions(-) diff --git a/ads/vendors/navegg.js b/ads/vendors/navegg.js index fc0936b917d4..9cd0cd00d9f6 100644 --- a/ads/vendors/navegg.js +++ b/ads/vendors/navegg.js @@ -7,7 +7,7 @@ import {doubleclick} from '#ads/google/doubleclick'; * @param {!Object} data */ export function navegg(global, data) { - validateData(data, ['acc']); + validateData(data, ['acc', 'wst', 'wct', 'wla']); const {acc} = data; let seg, nvg = function () {}; @@ -17,6 +17,9 @@ export function navegg(global, data) { loadScript(global, 'https://tag.navdmp.com/amp.1.0.0.min.js', () => { nvg = global[`nvg${acc}`] = new global['AMPNavegg']({ acc, + wst: data.wst || '0', + wct: data.wct || '0', + wla: data.wla || '0', }); nvg.getProfile((nvgTargeting) => { for (seg in nvgTargeting) { diff --git a/ads/vendors/navegg.md b/ads/vendors/navegg.md index ab60804481de..574764a7973f 100644 --- a/ads/vendors/navegg.md +++ b/ads/vendors/navegg.md @@ -18,4 +18,4 @@ To get Navegg integration working you only need to specify the `rtc-config` para The Navegg adapter only supports DoubleClick for now. For the most up-to-date list of DoubleClick supported parameters and usage, refer to the [DoubleClick reference guide](https://github.com/ampproject/amphtml/blob/main/ads/google/doubleclick.md). -For any help, please contact [Navegg](https://www.navegg.com/en/institutional/#contact). +For any help, please contact [Navegg](https://www.navegg.com/en/about-us/contacts). diff --git a/extensions/amp-analytics/0.1/test/vendor-requests.json b/extensions/amp-analytics/0.1/test/vendor-requests.json index 03e2fbf822d6..1b4d140c3a90 100644 --- a/extensions/amp-analytics/0.1/test/vendor-requests.json +++ b/extensions/amp-analytics/0.1/test/vendor-requests.json @@ -344,7 +344,7 @@ "onvisible": "https://!beacon_url?h.d=!h.d&h.key=!h.key&h.t=!h.t&h.cr=!h.cr&rt.start=navigation&rt.si=_client_id(amp_mpulse)_&rt.ss=_timestamp_&rt.end=_timestamp_&t_resp=_nav_timing(navigationStart%2CresponseStart)_&t_page=_nav_timing(responseStart%2CloadEventStart)_&t_done=_nav_timing(navigationStart%2CloadEventStart)_&nt_nav_type=_nav_type_&nt_red_cnt=_nav_redirect_count_&nt_nav_st=_nav_timing(navigationStart)_&nt_red_st=_nav_timing(redirectStart)_&nt_red_end=_nav_timing(redirectEnd)_&nt_fet_st=_nav_timing(fetchStart)_&nt_dns_st=_nav_timing(domainLookupStart)_&nt_dns_end=_nav_timing(domainLookupEnd)_&nt_con_st=_nav_timing(connectStart)_&nt_ssl_st=_nav_timing(secureConnectionStart)_&nt_con_end=_nav_timing(connectEnd)_&nt_req_st=_nav_timing(requestStart)_&nt_res_st=_nav_timing(responseStart)_&nt_unload_st=_nav_timing(unloadEventStart)_&nt_unload_end=_nav_timing(unloadEventEnd)_&nt_domloading=_nav_timing(domLoading)_&nt_res_end=_nav_timing(responseEnd)_&nt_domint=_nav_timing(domInteractive)_&nt_domcontloaded_st=_nav_timing(domContentLoadedEventStart)_&nt_domcontloaded_end=_nav_timing(domContentLoadedEventEnd)_&nt_domcomp=_nav_timing(domComplete)_&nt_load_st=_nav_timing(loadEventStart)_&nt_load_end=_nav_timing(loadEventEnd)_&v=1&http.initiator=amp&u=_source_url_&.u=_ampdoc_url_&r2=_document_referrer_&scr.xy=_screen_width_x_screen_height_" }, "navegg": { - "pageview": "https://amp.navdmp.com/amp?aid=_client_id(navegg_id)_&url=_canonical_url_&ref=_document_referrer_&tit=_title_&lan=_browser_language_&acc=!account&v=7" + "pageview": "https://amp.navdmp.com/amp?aid=_client_id(navegg_id)_&url=_canonical_url_&ref=_document_referrer_&tit=_title_&lan=_browser_language_&acc=!account&wst=_wst_&wct=_wct_&wla=_wla_&v=7" }, "neodata": { "base": "https://tra.neodatagroup.com", diff --git a/extensions/amp-analytics/0.1/vendors/navegg.json b/extensions/amp-analytics/0.1/vendors/navegg.json index 77e733cafe12..01298e59a812 100644 --- a/extensions/amp-analytics/0.1/vendors/navegg.json +++ b/extensions/amp-analytics/0.1/vendors/navegg.json @@ -1,6 +1,6 @@ { "requests": { - "pageview": "https://amp.navdmp.com/amp?aid=${clientId(navegg_id)}&url=${canonicalUrl}&ref=${documentReferrer}&tit=${title}&lan=${browserLanguage}&acc=${account}&v=7" + "pageview": "https://amp.navdmp.com/amp?aid=${clientId(navegg_id)}&url=${canonicalUrl}&ref=${documentReferrer}&tit=${title}&lan=${browserLanguage}&acc=${account}&wst=${wst}&wct=${wct}&wla=${wla}&v=7" }, "triggers": { "trackpageview": { diff --git a/src/service/real-time-config/callout-vendors.js b/src/service/real-time-config/callout-vendors.js index da209a02d05a..6387951c8cc2 100644 --- a/src/service/real-time-config/callout-vendors.js +++ b/src/service/real-time-config/callout-vendors.js @@ -147,8 +147,8 @@ const RTC_VENDORS = jsonConfiguration({ disableKeyAppend: true, }, navegg: { - url: 'https://usr.navdmp.com/usr?acc=NVG_ACC&wst=0&v=10', - macros: ['NVG_ACC'], + url: 'https://usr.navdmp.com/usr?acc=NVG_ACC&wst=WST&wct=WCT&wla=WLA&v=7', + macros: ['NVG_ACC', 'WST', 'WCT', 'WLA'], disableKeyAppend: true, }, newspassid: { From 0a4c30fc1555641ff94b5f12afe20e85f5b678f5 Mon Sep 17 00:00:00 2001 From: Hugo Date: Mon, 28 Oct 2024 17:01:05 -0300 Subject: [PATCH 2/5] =?UTF-8?q?feat(new=20variables):=20=F0=9F=9B=A0=20=20?= =?UTF-8?q?Adjust=20optional=20variables=20validation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ads/vendors/navegg.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ads/vendors/navegg.js b/ads/vendors/navegg.js index 9cd0cd00d9f6..ccd702848f5c 100644 --- a/ads/vendors/navegg.js +++ b/ads/vendors/navegg.js @@ -7,7 +7,11 @@ import {doubleclick} from '#ads/google/doubleclick'; * @param {!Object} data */ export function navegg(global, data) { - validateData(data, ['acc', 'wst', 'wct', 'wla']); + const requiredParams = ['acc']; + const optionalParams = ['wst', 'wct', 'wla']; + + validateData(data, requiredParams, optionalParams); + const {acc} = data; let seg, nvg = function () {}; From a477c103e1d2b240a34d5f4e64b7ca8d567f11c2 Mon Sep 17 00:00:00 2001 From: Hugo Date: Mon, 28 Oct 2024 17:07:13 -0300 Subject: [PATCH 3/5] =?UTF-8?q?feat(new=20variables):=20=F0=9F=9B=A0=20=20?= =?UTF-8?q?Fix=20navegg=20URL=20version=20parameter?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/service/real-time-config/callout-vendors.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/service/real-time-config/callout-vendors.js b/src/service/real-time-config/callout-vendors.js index 6387951c8cc2..afc56e19baaf 100644 --- a/src/service/real-time-config/callout-vendors.js +++ b/src/service/real-time-config/callout-vendors.js @@ -147,7 +147,7 @@ const RTC_VENDORS = jsonConfiguration({ disableKeyAppend: true, }, navegg: { - url: 'https://usr.navdmp.com/usr?acc=NVG_ACC&wst=WST&wct=WCT&wla=WLA&v=7', + url: 'https://usr.navdmp.com/usr?acc=NVG_ACC&wst=WST&wct=WCT&wla=WLA&v=10', macros: ['NVG_ACC', 'WST', 'WCT', 'WLA'], disableKeyAppend: true, }, From d755dcc5b211b7118a27cffdf376d8305459f530 Mon Sep 17 00:00:00 2001 From: Hugo Date: Mon, 28 Oct 2024 18:57:42 -0300 Subject: [PATCH 4/5] =?UTF-8?q?feat(AMP=20new=20variables):=20=F0=9F=9B=A0?= =?UTF-8?q?=20=20Ensure=20new=20variables=20value?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ads/vendors/navegg.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ads/vendors/navegg.js b/ads/vendors/navegg.js index ccd702848f5c..9128496acf92 100644 --- a/ads/vendors/navegg.js +++ b/ads/vendors/navegg.js @@ -21,9 +21,9 @@ export function navegg(global, data) { loadScript(global, 'https://tag.navdmp.com/amp.1.0.0.min.js', () => { nvg = global[`nvg${acc}`] = new global['AMPNavegg']({ acc, - wst: data.wst || '0', - wct: data.wct || '0', - wla: data.wla || '0', + wst: data.wst ? '1' : '0', + wct: data.wct ? '1' : '0', + wla: data.wla ? '1' : '0', }); nvg.getProfile((nvgTargeting) => { for (seg in nvgTargeting) { From 19225c2386a6a36ccafa7ab55b2232a016ebd316 Mon Sep 17 00:00:00 2001 From: Hugo Date: Tue, 29 Oct 2024 02:37:51 -0300 Subject: [PATCH 5/5] =?UTF-8?q?feat(AMP=20new=20variables):=20=F0=9F=9B=A0?= =?UTF-8?q?=20=20Test=20fix,=20params=20adjust?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ads/vendors/navegg.js | 4 ++-- extensions/amp-analytics/0.1/test/vendor-requests.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ads/vendors/navegg.js b/ads/vendors/navegg.js index 9128496acf92..cdcf54d82cdb 100644 --- a/ads/vendors/navegg.js +++ b/ads/vendors/navegg.js @@ -7,8 +7,8 @@ import {doubleclick} from '#ads/google/doubleclick'; * @param {!Object} data */ export function navegg(global, data) { - const requiredParams = ['acc']; - const optionalParams = ['wst', 'wct', 'wla']; + const requiredParams = ['acc', 'wst', 'wct', 'wla']; + const optionalParams = []; validateData(data, requiredParams, optionalParams); diff --git a/extensions/amp-analytics/0.1/test/vendor-requests.json b/extensions/amp-analytics/0.1/test/vendor-requests.json index 1b4d140c3a90..bea5067e24b6 100644 --- a/extensions/amp-analytics/0.1/test/vendor-requests.json +++ b/extensions/amp-analytics/0.1/test/vendor-requests.json @@ -344,7 +344,7 @@ "onvisible": "https://!beacon_url?h.d=!h.d&h.key=!h.key&h.t=!h.t&h.cr=!h.cr&rt.start=navigation&rt.si=_client_id(amp_mpulse)_&rt.ss=_timestamp_&rt.end=_timestamp_&t_resp=_nav_timing(navigationStart%2CresponseStart)_&t_page=_nav_timing(responseStart%2CloadEventStart)_&t_done=_nav_timing(navigationStart%2CloadEventStart)_&nt_nav_type=_nav_type_&nt_red_cnt=_nav_redirect_count_&nt_nav_st=_nav_timing(navigationStart)_&nt_red_st=_nav_timing(redirectStart)_&nt_red_end=_nav_timing(redirectEnd)_&nt_fet_st=_nav_timing(fetchStart)_&nt_dns_st=_nav_timing(domainLookupStart)_&nt_dns_end=_nav_timing(domainLookupEnd)_&nt_con_st=_nav_timing(connectStart)_&nt_ssl_st=_nav_timing(secureConnectionStart)_&nt_con_end=_nav_timing(connectEnd)_&nt_req_st=_nav_timing(requestStart)_&nt_res_st=_nav_timing(responseStart)_&nt_unload_st=_nav_timing(unloadEventStart)_&nt_unload_end=_nav_timing(unloadEventEnd)_&nt_domloading=_nav_timing(domLoading)_&nt_res_end=_nav_timing(responseEnd)_&nt_domint=_nav_timing(domInteractive)_&nt_domcontloaded_st=_nav_timing(domContentLoadedEventStart)_&nt_domcontloaded_end=_nav_timing(domContentLoadedEventEnd)_&nt_domcomp=_nav_timing(domComplete)_&nt_load_st=_nav_timing(loadEventStart)_&nt_load_end=_nav_timing(loadEventEnd)_&v=1&http.initiator=amp&u=_source_url_&.u=_ampdoc_url_&r2=_document_referrer_&scr.xy=_screen_width_x_screen_height_" }, "navegg": { - "pageview": "https://amp.navdmp.com/amp?aid=_client_id(navegg_id)_&url=_canonical_url_&ref=_document_referrer_&tit=_title_&lan=_browser_language_&acc=!account&wst=_wst_&wct=_wct_&wla=_wla_&v=7" + "pageview": "https://amp.navdmp.com/amp?aid=_client_id(navegg_id)_&url=_canonical_url_&ref=_document_referrer_&tit=_title_&lan=_browser_language_&acc=!account&wst=!wst&wct=!wct&wla=!wla&v=7" }, "neodata": { "base": "https://tra.neodatagroup.com",