View difference between Paste ID: E3fhUWg6 and pYpYfTHK
SHOW: | | - or go back to the newest paste.
1-
//Push this dataLayer event when the user clicks to change between the tabs on the magazine website.
1+
//Push this dataLayer event on every page before Google Tag Manager loads.
2
3
<script>
4
window.dataLayer = window.dataLayer || [];
5
window.dataLayer.push({
6-
 'event': 'magazine_tab_change',
6+
 'event': 'user_info',
7-
 'tab_name': 'latest',  //Name of the tab that was selected or from which the link was clicked.
7+
 'user_id': '<user_id>',  //Unique user ID of a registered user from the website's database.
8-
 'content_group': 'magazine',  //The content group that the content piece belongs to.
8+
 'login_status': 'logged in',  //If the user is logged in or not.
9-
 'position': '2',  //The element's position in the list, carousel, or card section.
9+
 'user_persona': '<user_persona>',  //TBD
10-
 'ui_element_name': '<ui_element_name>',  //The name of the UI element from the Zeplin file.
10+
 'xdb_id': '<xdb_id>'  //Sitecore ID for all website visitors (logged in or not logged in).
11-
 'ui_element_category': '<ui_element_category>'  //The category of the UI element.
11+
12
</script>