dusanmiha

GA4 - banner_link_click - Duni

Apr 27th, 2023 (edited)
362
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //push the banner_link_click event to dataLayer when the user clicks the CTA button within the banner on all website pages where banners exist.
  2.  
  3. <script>
  4. window.dataLayer = window.dataLayer || [];
  5. window.dataLayer.push({
  6.  'event': 'banner_link_click',
  7.  'cd_click_text': 'REQUEST MORE INFORMATION!',  //cd_click_text should contain CTA button text (for example, REQUEST MORE INFORMATION!)
  8.  'cd_click_url': 'https://nl.dunigroup.com/en/branded-napkins#cmsitem_00203006'  //cd_click_url should contain a destination URL where the user will land after the click. (for example https://nl.dunigroup.com/en/branded-napkins#cmsitem_00203006 on the https://nl.dunigroup.com/en/branded-napkins page)
  9.  });
  10. </script>
Advertisement
Add Comment
Please, Sign In to add comment