SHOW:
|
|
- or go back to the newest paste.
| 1 | - | //Push this dataLayer event when the user clicks on a sub-category link. This typically happens on a product category page. |
| 1 | + | //Push this dataLayer event when the user clicks on a side-menu link on the product page. |
| 2 | ||
| 3 | <script> | |
| 4 | window.dataLayer = window.dataLayer || []; | |
| 5 | window.dataLayer.push({
| |
| 6 | - | 'event': 'sub_category_click', |
| 6 | + | 'event': 'product_side_menu_click', |
| 7 | - | 'page_section': 'sub-categories', //Section of the page where the event happened. |
| 7 | + | 'product_name': '<product_name>', |
| 8 | 'category': '<category>', | |
| 9 | - | 'position': '3', //The element's position in the list, carousel, or card section. |
| 9 | + | |
| 10 | - | 'strategic_field': '<strategic_field>', |
| 10 | + | 'click_element': 'features' //Text or description of the element that was clicked on. |
| 11 | - | 'topic': '<topic>', |
| 11 | + | |
| 12 | </script> |