EasySearch FAQ

How to pass the search request data to Google Analytics?

If you'd like to pass the search request data to GA, you'll need to do it using Google Tag Manager. First, you need to link your Google Analytics property with Google Tab Manager - follow Google's instructions.

After you're done with previous step, please follow the next steps:

Step 1. You need to create a GTM user-defined variable for the JavaScript code:

Variables -> User-Defined Variables -> New -> Variable Configuration -> Custom JavaScript

and paste the following code:

function(){ 
  return easysearch.curIndex.replace(/,$/, '').replace(/^,/, '-,').replace(/,$/, ',-').replace(/,,/, ',-,').replace(/,/g, ' / ');
}

Step 2. Then, you need to create the Click trigger for the "Search" button and the "Google Analytics" tag of the "Event" track type and set the variable you created as Action.

Please try to perform the steps described and let us know if you have any further questions or difficulties via email support@nexusmedia-ua.com

Other EasySearch FAQs

How to add a Fitment widget Manually? How to add a Fitment widget using Theme Customizer? How to add a Search Form Manually? How to add a Search Form using the Theme Customizer? How to create a search Data Base? How to apply the filters automatically while surfing the store? Shopify limits - 250 tags only available for each product How to add products outside of Turn 14? How to pass the search request data to Google Analytics?