SHOW:
|
|
- or go back to the newest paste.
| 1 | - | //Push this dataLayer event when the user clicks on a link in the top navigation menu of a page. |
| 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': 'top_nav_click', |
| 6 | + | 'event': 'carousel_change', |
| 7 | - | 'click_element': 'sustainability', //Text or description of the element that was clicked on. |
| 7 | + | 'carousel_action': 'arrow', //If the user clicked on an arrow or dot, or swiped. |
| 8 | - | 'menu_name': 'top nav 2', //Name of the menu that was clicked on. |
| 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> |