How to Set Up Google Analytics Site Search Tracking [WordPress]

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.

MonsterInsights is the best WordPress Analytics plugin. Get it for free!

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 Home Dashboard

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:

Install MonsterInsights Google Analytics for Free

Once the plugin is installed, click Activate:

activate monsterinsights lite

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.

GA4 select account property

Then, click the Admin cog in the lower left. On the Admin screen, click Data Streams:

Click on the active stream:

GA4 data 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.

Google Analytics site search tracking

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:

Blank GA4 report

Then, click the plus sign in the Dimensions box:

Add dimensions to a custom explore report in GA4

Next, search for and import the Event name dimension and the Search term dimension:

Search term dimension - Google Analytics search term tracking

Now, click the plus sign in the Metrics box and import Event count:

GA4 event count metric

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:

GA4 site search dimension metric

Then, grab your Event name dimension and drag it to Filters. Choose Exactly matches and view_search_results.

GA4 site search report

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:

GA4 site search report

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?

And don’t forget to follow us on Twitter, Facebook and YouTube for more helpful Google Analytics tips.

Want to Try MonsterInsights for Free?

Enter the URL of Your WordPress website to install MonsterInsights Lite.

Comments

  1. The option for view_search_result in the filter section of the event count isn’t there anymore, what can I choose either.

    1. Hi there – I just tried it and found it to be there. Are you sure you have site search tracking turned on in Enhanced Measurement? Make sure to follow step 2 in the article.

    1. Hey Jesse – If you add the “Page referrer” dimension to the custom report described in the article, that should show you the page your users were on before they got to the search result page (aka the one they were on when they searched).

Add a Comment

We're glad you have chosen to leave a comment. Please keep in mind that all comments are moderated according to our privacy policy, and all links are nofollow. Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.

This form is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.