filipr27

ga4 - slb new - magazine_click

Sep 7th, 2022 (edited)
169
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 magazine post link on any page.
  2.  
  3. <script>
  4. window.dataLayer = window.dataLayer || [];
  5. window.dataLayer.push({
  6.  'event': 'magazine_click',
  7.  'page_section': 'featured articles',  // Section of the page where the event happened.
  8.  'tab_name': 'latest', // Name of the tab that was selected or from which the link was clicked.
  9.  'title': 'methane and flare emissions. a fixable problem',  // The title of the content piece.
  10.  'content_type': 'article',  // The type of content.
  11.  'content_category': 'decarbonizing, new energy', // Category that the content piece belongs to. If multiple, separate names by a comma.
  12.  'content_group': 'magazine',  // The content group that the content piece belongs to.
  13.  'position': '2', // The element's position in the list, carousel, or card section.
  14.  'ui_element_name': '<ui_element_name>', // The name of the UI element from the Zeplin file.
  15.  'ui_element_category': '<ui_element_category>',  // The category of the UI element.
  16.  'author_name': 'suzy nicholls, stephanie texas, lebron john', // Name of the author(s). If multiple authors, separate names by a comma.
  17.  'time_to_consume_content_range': '5-7' // Estimated consumption time. Grouped by specific ranges.
  18.  });
  19. </script>
Advertisement
Add Comment
Please, Sign In to add comment