filipr27

ga4 - slb new - helpful_links_click

Sep 8th, 2022
165
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 helpful links section on a page. (Don't push this event for the links in the footer.)
  2.  
  3. <script>
  4. window.dataLayer = window.dataLayer || [];
  5. window.dataLayer.push({
  6.  'event': 'helpful_links_click',
  7.  'click_element': 'magazine',  //Text or description of the element that was clicked on.
  8.  'position': '2',  //The element's position in the list, carousel, or card section.
  9.  'ui_element_name': 'helpful links',  //The name of the UI element from the Zeplin file.
  10.  'ui_element_category': 'link'  //The category of the UI element.
  11.  });
  12. </script>
Advertisement
Add Comment
Please, Sign In to add comment