diff --git a/components/n-ui/tracking/third-party/floodlight.js b/components/n-ui/tracking/third-party/floodlight.js index cfd9b066b..1a813896c 100644 --- a/components/n-ui/tracking/third-party/floodlight.js +++ b/components/n-ui/tracking/third-party/floodlight.js @@ -29,12 +29,14 @@ module.exports = function (flags) { document.body.dispatchEvent(event); }; - const gtagEvent = (sendTo) => { + const gtagEvent = ({sendTo, conversionLabel}) => { window.gtag('event', 'conversion', { 'allow_custom_scripts': true, + 'send_to': sendTo, 'u1': '[u10]', 'u10': spoorId, - 'send_to': sendTo + 'u3': conversionLabel || undefined, + 'u4': '801156123' }); // Fix a11y issue with this iframe not having a title element. const iframes = document.querySelectorAll('iframe[src*="doubleclick.net"]'); @@ -45,23 +47,23 @@ module.exports = function (flags) { if (flags && (flags.get('floodlight') && spoorId)) { if (isSignUpForm) { - gtagEvent('DC-9073629/ftsig0/ftmem0+standard'); + gtagEvent({ sendTo: 'DC-9073629/ftsig0/ftmem0+standard', conversionLabel: 'LbQoCMCdwpgBEJvYgv4C' }); } else if (isTrialConfirmation) { - gtagEvent('DC-9073629/ftcon00/fttri0+standard'); + gtagEvent({ sendTo: 'DC-9073629/ftcon00/fttri0+standard', conversionLabel: 'PgrhCNn-uJgBEJvYgv4C' }); } else if (isSubscriptionConfirmation) { - gtagEvent('DC-9073629/ftcon0/ftsub0+standard'); + gtagEvent({ sendTo: 'DC-9073629/ftcon0/ftsub0+standard', conversionLabel: 'ACJ0COO0rpgBEJvYgv4C' }); } else if (isBarrier) { - gtagEvent('DC-9073629/ftbar0/ftlan0+standard'); + gtagEvent({ sendTo: 'DC-9073629/ftbar0/ftlan0+standard', conversionLabel: 'I9pgCMe2rpgBEJvYgv4C' }); // Note: move this call into the `gtagEvent` call when removing the old code. customTrackingEvent(); } else if (isSubscriber) { - gtagEvent('DC-9073629/ftsub0/ftlog0+standard'); + gtagEvent({ sendTo: 'DC-9073629/ftsub0/ftlog0+standard', conversionLabel: 'kgKFCIn5uJgBEJvYgv4C' }); customTrackingEvent(); } else if (isRegistered) { - gtagEvent('DC-9073629/ftreg0/ftlog0+standard'); + gtagEvent({ sendTo: 'DC-9073629/ftreg0/ftlog0+standard', conversionLabel: 'sCLX1uJgBEJvYgv4C' }); customTrackingEvent(); } else if (isAnonymous) { - gtagEvent('DC-9073629/ftrem0/ftsit0+standard'); + gtagEvent({sendTo: 'DC-9073629/ftrem0/ftsit0+standard'}); } } };