Do you want to learn what your visitors are searching for on your site? Then, you need to enable Google Analytics site search tracking on your WordPress website.
Site search tracking gives you insights about how people use your website, and can help you make improvements to your website so that content can be found easier.
In this article, we’ll show you how to set up GA4 site search tracking in WordPress.
Why Should You Enable GA4 Site Search Tracking?
If you’ve got a WordPress site with lots of valuable content, you might want to provide a search box on your site. It helps your visitors to find the content they want easily and improves user experience.
You can use the built-in search feature that WordPress provides, or use a WordPress search plugin to get started.
But why is it important to track site searches?
A few benefits of enabling Google Analytics 4 site search tracking are:
- Identify exactly what your visitors are looking for on your site
- Find new topic ideas for your blog
- Optimize the user experience of your website by making often-searched content easier to find or featured
- Fix issues with your site that are making it hard to find certain content
How to Track Site Search in WordPress
You can easily track your WordPress site search in Google Analytics. It’s a powerful analytics tool that helps you see how people use your website.
Just follow these steps, and within a few minutes, you’ll be able to see what your visitors search for on your website.
Step 1: Install MonsterInsights & Connect Google Analytics
The first thing you need to do is set up and connect Google Analytics with your WordPress site.
The easiest way of setting up Google Analytics on WordPress is with the MonsterInsights plugin. It’s the best Google Analytics plugin for WordPress and makes it effortless to track your visitors.
Using its setup wizard, you can easily add Google Analytics to WordPress without having to touch a single line of code.
MonsterInsights also offers advanced tracking features like event tracking right out of the box. For instance, you can automatically track outbound links, affiliate links, telephone, and mailto link clicks.
For even more features such as UTM campaign tracking, video tracking, form submission tracking, eCommerce tracking, tons of dashboard reports, and more, grab the MonsterInsights Plus or Pro.
To get set up with basic tracking, head to your WordPress dashboard and go to Plugins » Add new. Search for MonsterInsights, then click Install Now:
Once the plugin is installed, click Activate:
Then, go ahead and follow the steps in the installation wizard to get set up. For a full MonsterInsights setup tutorial, check out How to Add Google Analytics to WordPress the Right Way.
Step 2: Turn On Site Search Tracking in GA4
Once you’ve successfully added Google Analytics to your WordPress site, the next step is to turn on site search tracking.
To start, sign in to your Google Analytics account and choose the site in which you’d like to enable search tracking.
Then, click the Admin cog in the lower left. On the Admin screen, click Data Streams:
Click on the active stream:
Now, under Enhanced Measurement, make sure Site Search is turned on. Although you want most of the other enhanced measurement options switched off when you’re using MonsterInsights, you can use the Site Search tracking feature. If it’s not turned on, click on the cog icon to add it. Also make sure the enhanced measurement toggle is switched to on.
That’s it! Site search tracking is turned on.
How to Find Site Search Terms Data in Google Analytics
After enabling site search on your site, you’ll need to wait for data to be collected. Once people have run some searches on your site, you’ll be able to find the reports in Google Analytics.
To find your site searches, we recommend using an Explore report. If you haven’t created one before, you can familiarize yourself with it here: How to Create Google Analytics 4 Custom Reports (Step by Step)
To start, open the Explore tab and create a Blank report:
Then, click the plus sign in the Dimensions box:
Next, search for and import the Event name dimension and the Search term dimension:
Now, click the plus sign in the Metrics box and import Event count:
The next step is to click and drag your Search term dimension up into the Rows box, and drag the Event count metric down to the Values box:
Then, grab your Event name dimension and drag it to Filters. Choose Exactly matches and view_search_results.
That’s it! You now have a report of the search terms users have typed in on your site, plus how many times each one was searched:
We hope this article helped you set up Google Analytics site search tracking on your WordPress site.
You might also want to check out How to Track Link Clicks in Google Analytics 4 and WordPress.
Not using MonsterInsights yet? What are you waiting for?