filipr27

ga4 - slb new - popular_searches_click

Sep 12th, 2022
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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': '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>
Advertisement
Add Comment
Please, Sign In to add comment