filipr27

ga4 - slb new - resource_click

Sep 7th, 2022
132
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 resource link on any page. These links usually appear in "related resources" or "case studies" sections across many pages. They also appear on the resources landing page.
  2.  
  3. <script>
  4. window.dataLayer = window.dataLayer || [];
  5. window.dataLayer.push({
  6.  'event': 'resource_click',
  7.  'page_section': 'related resources',  // Section of the page where the event happened. This is usually the title of the hero banner or heading for the part of the page. (H1 or H2 tag)
  8.  'title': 'operator expands operating envelope using improved packers',  // The title of the content piece.
  9.  'content_type': 'case study',  // The type of content.
  10.  'content_group': 'resource',  // The content group that the content piece belongs to.
  11.  'position': '2', // The element's position in the list, carousel, or card section.
  12.  'ui_element_name': 'case studies carousel', // The name of the UI element from the Zeplin file.
  13.  'ui_element_category': 'carousel'  // The category of the UI element.
  14.  });
  15. </script>
Advertisement
Add Comment
Please, Sign In to add comment