filipr27

ga4 - slb new - file_download

Sep 9th, 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 to download a file.
  2.  
  3. <script>
  4. window.dataLayer = window.dataLayer || [];
  5. window.dataLayer.push({
  6.  'event': 'file_download',
  7.  'page_section': 'featured product',  //Section of the page where the event happened.
  8.  'title': 'title',  //Title of the content piece.
  9.  'format': 'pdf',
  10.  'content_type': 'product sheet',  //Type of content.
  11.  'file_url': '<file_url>',
  12.  'content_group': 'resource',  //Content group that the content piece belongs to.
  13.  'strategic_field': '<strategic_field>',
  14.  'solution': '<solution>',
  15.  'topic': '<topic>',
  16.  'category': '<category>',
  17.  'sub_category': '<sub_category>',
  18.  'product_family': '<product_family>',
  19.  'family': '<family>',
  20.  'identifier': '<identifier>',
  21.  'business_line': '<business_line>',
  22.  'division': '<division>',
  23.  'marks_list': '<marks_list>',
  24.  'ui_element_name': '<ui_element_name>',  //Name of the UI element from the Zeplin file.
  25.  'ui_element_category': 'ui_element_category'  //Category of the UI element.
  26.  });
  27. </script>
Advertisement
Add Comment
Please, Sign In to add comment