filipr27

ga4 - slb new - footer_click

Sep 8th, 2022 (edited)
181
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 link in the main footer section of the page. Do not push this event when the user clicks on the social media profile links.
  2.  
  3. <script>
  4. window.dataLayer = window.dataLayer || [];
  5. window.dataLayer.push({
  6.  'event': 'footer_click',
  7.  'menu_name': 'helpful links',  //Section of the page where the event happened.
  8.  'click_element': 'customer support',  //Text or description of the element that was clicked on.
  9.  'ui_element_name': '<ui_element_name>',  //The name of the UI element from the Zeplin file.
  10.  'ui_element_category': 'footer'  //The category of the UI element.
  11.  });
  12. </script>
Advertisement
Add Comment
Please, Sign In to add comment