Providing a search box on your site and tracking how people use it can provide you with important insights. MonsterInsights tracks site searches by default, so you can easily develop a data-driven content strategy.
But it’s important to enable this setting in Google Analytics, too. In this guide, we’ll show you how to enable site search tracking in Google Analytics so you can view the data on your MonsterInsights report.
Step 1: Open Your Settings in Google Analytics
For users who have a Universal Analytics property, first thing you need to do is to sign in to your Google Analytics account and choose the site in which you’d like to enable search tracking.
Then, click the Admin option.
Then, click View Settings.
Step 2: Enable Site Search Tracking
Now scroll down to the Site Search Settings heading. Click the slider to turn the Site search Tracking on.
After turning on site search tracking, you’ll see a field to enter a Query parameter.
The “query parameter” is the letter that appears in your site’s URL before the search terms. For most WordPress sites, the query parameter is the letter “s.” You can test this by searching on your site and checking the URL.
In the example above, you can see the URL is
http://optinmonster.com/?s=exit-intent, meaning “s” is the query parameter. In your URL, the letter that comes after the question mark and before the equals sign is your query parameter.
Step 3: Check “Strip Query Parameters”
Be sure to check the box that says “Strip query parameters out of URL.”
If this option is not selected, Google Analytics will start splitting up tracking for each visited page. For example, you might start to see separate listings for mysite.com/page?s=1, mysite.com/page?s=2, etc.
When you tell Google Analytics to strip the query parameters out of your URLs, it will just track all of those visits together as mysite.com/page. But, you’ll still be able to see your internal searches when viewing your site search data.
Step 4: Save Changes
When you’re finished entering your settings, be sure to click the Save button.
Now you can see how the visitors search your site. In Google Analytics, you can go to Behavior » Site Search » Overview to view your site search data.
Google Analytics 4
With Google Analytics 4 properties, we recommend that you use SearchWP for your site search analytics.
SearchWP will be able to show you much more information about searches that are performed on your website. This includes information about your top search results for the week, month, and year. You’ll also be able to see which results are not showing any results.
For more information about SearchWP you can check out their site linked here: https://searchwp.com/