Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Push this dataLayer event when the user performs a site search. The event should fire on the page where the results are displayed. It should fire even if there are no results.
- <script>
- window.dataLayer = window.dataLayer || [];
- window.dataLayer.push({
- 'event': 'search',
- 'search_term': 'oil drill', //The term that the user searched for.
- 'results_count': '35', //The count of results for a search term or applied filter.
- 'website': 'www.slb.com', //The website hostname where the event happened.
- 'content_group': 'magazine' //The content group that the content piece belongs to.
- });
- </script>
Advertisement
Add Comment
Please, Sign In to add comment