Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Fire this dataLayer event when a user interacts with header elements. Note that we are not allowed to send emails or any other PII to Google Analytics.
- <script>
- window.dataLayer = window.dataLayer || [];
- window.dataLayer.push({
- 'event': 'headerInteraction',
- 'dropdownCategory': 'Products, Sellers or Profile', // Variable value based on user's selection. Send this parameter with dropdown clicks Header clicks only. Value of parameter should be dropdown label (ex Products, Sellers, Profile).
- 'elementText': 'Logo, Home, Products, Completions, Drilling, Geoscience, Shop all products, Sellers, See all sellers, Cameron, profile, orders, Saved carts, Cart, Sign in, Register, Open Menu, Close Menu etc..' // Variable value based on the click text or visitors interaction.
- });
- </script>
Add Comment
Please, Sign In to add comment