filipr27

ga4 - slb new - facet_deselect

Sep 12th, 2022
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //Push this dataLayer event when the user deselects a facet to cancel a filter on the search results or library page.
  2.  
  3. <script>
  4. window.dataLayer = window.dataLayer || [];
  5. window.dataLayer.push({
  6.  'event': 'facet_deselect',
  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.  'facet_title': '<facet_title>',  //The title of the facet that was selected / deselected.
  12.  'facet_category': '<facet_category>'  //The category where the facet belongs to.
  13.  });
  14. </script>
Advertisement
Add Comment
Please, Sign In to add comment