filipr27

ga4 - slb new - event_click

Sep 7th, 2022 (edited)
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //Push this dataLayer event when user clicks on an event link on any page.
  2.  
  3. <script>
  4. window.dataLayer = window.dataLayer || [];
  5. window.dataLayer.push({
  6.  'event': 'event_click',
  7.  'page_section': 'upcoming events',  //Section of the page where the click happened.
  8.  'title': 'slb careers fair 2022',  //The title of the event.
  9.  'content_type': 'event',  //The type of content.
  10.  'content_group': 'event',  //The content group that the content piece belongs to.
  11.  'position': '1',  //The element's position in the list, carousel, or card section.
  12.  'author_name': 'john doe, jane doe',  //Name of the speaker(s). If multiple speakers, separate names by a comma.
  13.  'ui_element_name': 'events carousel',  //The name of the UI element from the Zeplin file.
  14.  'ui_element_category': 'carousel'  //The category of the UI element.
  15.  });
  16. </script>
Advertisement
Add Comment
Please, Sign In to add comment