filipr27

ga4 - slb new - cta_click

Sep 8th, 2022 (edited)
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //Push this dataLayer event when the user clicks on a regular CTA button or text (hero CTA excluded). Do not push this event if some other event is firing here, e.g. product_click, file_download, etc.
  2.  
  3. <script>
  4. window.dataLayer = window.dataLayer || [];
  5. window.dataLayer.push({
  6.  'event': 'cta_click',
  7.  'page_section': 'talk to a specialist',  //Section of the page where the event happened.
  8.  'click_element': 'contact us',  //Text or description of the element that was clicked on.
  9.  'content_group': '<content_group>',  //Content group that the link belongs to. (include only if applicable - e.g. for "view more" buttons)
  10.  'ui_element_name': '<ui_element_name>',  //The name of the UI element from the Zeplin file.
  11.  'ui_element_category': '<ui_element_category>'  //The category of the UI element.
  12.  });
  13. </script>
Advertisement
Add Comment
Please, Sign In to add comment