Have you ever wondered what products your customers are searching for when visiting your store? This kind of information may be priceless to make decisions about what products you should incorporate to your inventory in order to increase sales.
You can get this kind of report using Google Analytics Search Reports and Google Tag Manager. You can do this wiht your Jumpseller store as well!
Before we move on to that, you have to make sure:
- You have a Google Analytics account connected to your store.
- Your Google Tag Manager Account is connected to your store.
- Your Google Analytics account is connected to your Google Tag Manager Account.
For more information on how to get your accounts running, please visit: How to use Google Products with Jumpseller
Setting up Google Tag Manager
In Tag Manager, we need to create two tags. One that triggers on simple page views and another that triggers when someone searches for an item on your store and then sends the data (term of search) as a variable to Google Analytics.
On the Google Tag Manager, do the following steps:
- Creating a Simple Tag to Record all the Page Views in Your Store. Let’s call it All Views.
- Create a more complex Tag, that triggers when a special action happens. In this case, when an internal search results page is loaded. We will call this tag Internal Search Views. This tag will have a variable and a trigger associated with it.
- Create a JavaScript variable in Google Tag Manager to pull out the query parameters. We will call this variable Search Query Parameter.
- Create the trigger Internal Search Trigger that will fire when an internal search results page is loaded.
- Add the Tag Internal Search Views as an exception to your regular page view tag called All Views. By doing this, the regular tag won’t show the pages that are a result of a search action.
Creating a Simple Tag to Record all the Page Views in Your Store
- In your main panel go to the left menu and select Tags.
- Create a new Tag by clicking on New.
- Name the Tag. We suggest using the name All Views.
- Click on the center icon.
- As tag type select Google Analytics - Universal Analytics.
- Set tag type as Page View and Google Analytics Settings as
{{Tracking ID}}
- Check Enable overriding settings in this tag.

Creating a Special Tag to Record just the Searches on Your Store
- In your main panel go to the left menu and select Tags.
- Create a new Tag by clicking on New.
- Name the Tag. We suggest using the name Internal Search Views.
- Click on the center .
- As tag type, select Google Analytics - Universal Analytics.
- Set tag type as “Page View” and Google Analytics Settings as
{{Tracking ID}}
- Check Enable overriding settings in this tag.
- On More Settings -> Fields to Set -> +Add Field. Set Field Name as page and the Value as
/search?q={{Search Query Parameter}}

Creating a Variable
- In your main panel go to the left menu and select Variables.
- Create a User-Defined Variables by clicking on New.
- Name the Variable. We suggest using Search Query Parameter.
- Click on the center icon.
- Choose as the variable type Custom Javascript.

- The variable needs to have a script code associated. This is the code you need to copy and paste:
function () {
// find and store the path of the current page
var pagePath = location.pathname;
// if the path starts with /search/, we know it's an internal SERP
if (pagePath.indexOf("/search/") === 0) {
// if the above checks out, let's figure out where the search term begins in the URL. Then, let's use that starting point to pull out the search term itself.
var searchString = pagePath.substring(pagePath.lastIndexOf("/") + 1);
// return what we found to GTM as the value of our variable
return searchString;
}
// if it's not an internal SERP page, return "none"
else {
return "none";
}
}

Creating a Trigger
- In your main panel go to the left menu and select Trigger.
- Create a new Trigger clicking on New.
- Name the Trigger. We suggest using Internal Search Trigger.
- Click on the center icon.
- Choose Page View as the trigger type.

- On trigger configuration, this trigger fires on select Some page Views.
- On Fire this trigger when an Event occurs and all of these conditions are true, select Page Path, starts with /search.

Making an Exception in your All Page Views Tag
Since we are creating a special tag to record visits to the search page, you need to exclude those visits from the main record.
Go to your first tag (the All Views tag) configuration and click on Add Exception.

Your final Tags Panel should look like this:

Set up Search Report on Google Analytics
In the Admin section of Google Analytics, turn Site Search tracking on and give Google Analytics the parameter you’ve set up.
- Go to your Admin panel on Google Analytics.
-
In the View column, click View Settings

- Under Site Search Settings, set Site Search Tracking to ON.
- Set q as the query parameter.

It can take a while (at least 24 Hrs) for data to show up in the site search report (Behavior -> Site Search in Google Analytics)

If you have further questions or want to learn more about Google Analytics Search Reports, visit Google Support
Related Articles
Tools to boost your online store and increase sales
These e-commerce tools can take a big chunk of the weight off your shoulders when it comes to management, design, marketing, and sales! Let us go t...
Using Google Products with Jumpseller
Use Google Tools like Google Analytics, Google Tag Manager, Google Workspace, Google Ads, Google Shopping, and Google Webmaster Tools to refine you...
How can I add reviews on my products
Boost your ranking, increase sales and CTR, get better feedback/suggestions and build trust by adding product reviews to your online store. Use ser...
Online Store statistics and metrics
Increase your profits by analysing customer behaviour! Different metrics on the Dashboard will help you sell more, create a better strategy, and ma...