View difference between Paste ID: EPJ2F3y9 and rGeY6fGG
SHOW: | | - or go back to the newest paste.
1-
//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.
1+
//Push this dataLayer event when the user clicks on a link in the "popular searches" section on the "no search results" page.
2
3
<script>
4
window.dataLayer = window.dataLayer || [];
5
window.dataLayer.push({
6-
 'event': 'search',
6+
 'event': 'popular_searches_click',
7
 'search_term': 'oil drill',  //The term that the user searched for.
8
 'results_count': '35',  //The count of results for a search term or applied filter.
9
 'website': 'www.slb.com',  //The website hostname where the event happened.
10
 'content_group': 'magazine'  //The content group that the content piece belongs to.
11
 });
12
</script>