You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In UA when we tracked the cta_click event we used the data-cta-type value differently than we are planning on using it in GA4. At the moment there is some custom JS in GTM to transform the value of the data-attribute into a more appropriate value for the GA4 cta_click event.
When we remove the UA code we can edit the values of data-cta-type in bedrock and do away with the custom JS variable in GTM.
if(element.tagName.toLowerCase() == 'a' && type == '') {
if(element.href.indexOf('https://relay.firefox.com') == 0 ) { type = 'relay'; }
if(element.href.indexOf('https://monitor.firefox.com') == 0 ) { type = 'monitor'; }
if(element.href.indexOf('https://getpocket.com') == 0 ) { type = 'pocket'; }
if(element.href.indexOf('https://accounts.firefox.com') == 0 ) { type = 'account'; }
if(element.href.indexOf('https://accounts.mozilla.org') == 0 ) { type = 'account'; }
}
Edit or remove data-cta-type values in bedrock to match output of CJS
Remove the custom JS from GTM in favour of an un-altered value for data-cta-type
The text was updated successfully, but these errors were encountered:
stephaniehobson
changed the title
[GTM] Replace variable {{CJS - data-cta-type (filtered for GA4)}} with non-JS version
Replace GTM variable {{CJS - data-cta-type (filtered for GA4)}} with non-JS version
Nov 30, 2023
In UA when we tracked the
cta_click
event we used the data-cta-type value differently than we are planning on using it in GA4. At the moment there is some custom JS in GTM to transform the value of the data-attribute into a more appropriate value for the GA4 cta_click event.When we remove the UA code we can edit the values of data-cta-type in bedrock and do away with the custom JS variable in GTM.
data-cta-type
values in bedrock to match output of CJSThe text was updated successfully, but these errors were encountered: