filipr27

ga4 - slb new - carousel_change

Sep 9th, 2022
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //Push this dataLayer event when the user clicks/swipes to see more items in a carousel element.
  2.  
  3. <script>
  4. window.dataLayer = window.dataLayer || [];
  5. window.dataLayer.push({
  6.  'event': 'carousel_change',
  7.  'carousel_action': 'arrow',  //If the user clicked on an arrow or dot, or swiped.
  8.  'content_group': 'magazine',  //Content group that the content piece belongs to.
  9.  'page_section': 'top nav 2',  //Section of the page where the event happened.
  10.  'ui_element_name': '<ui_element_name>',  //The name of the UI element from the Zeplin file.
  11.  'ui_element_category': '<ui_element_category>'  //The category of the UI element.
  12.  });
  13. </script>
Advertisement
Add Comment
Please, Sign In to add comment