Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ Add new analytics variables for Navegg vendor #40194

Merged
merged 7 commits into from
Oct 29, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion ads/vendors/navegg.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@ import {doubleclick} from '#ads/google/doubleclick';
* @param {!Object} data
*/
export function navegg(global, data) {
validateData(data, ['acc']);
const requiredParams = ['acc'];
const optionalParams = ['wst', 'wct', 'wla'];

validateData(data, requiredParams, optionalParams);

const {acc} = data;
let seg,
nvg = function () {};
Expand All @@ -17,6 +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',
});
nvg.getProfile((nvgTargeting) => {
for (seg in nvgTargeting) {
Expand Down
2 changes: 1 addition & 1 deletion ads/vendors/navegg.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
2 changes: 1 addition & 1 deletion extensions/amp-analytics/0.1/test/vendor-requests.json
Original file line number Diff line number Diff line change
Expand Up @@ -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_&amp.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",
Expand Down
2 changes: 1 addition & 1 deletion extensions/amp-analytics/0.1/vendors/navegg.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
4 changes: 2 additions & 2 deletions src/service/real-time-config/callout-vendors.js
Original file line number Diff line number Diff line change
Expand Up @@ -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=10',
macros: ['NVG_ACC', 'WST', 'WCT', 'WLA'],
disableKeyAppend: true,
},
newspassid: {
Expand Down
Loading