Setting up site search tracking in Google Analytics for WordPress and Tilda.cc

25 April 2020
Today I will tell you how to enable site search tracking in Google Analytics. To do it, you should already have the internal search functionality configured as part of your site.

I will show two examples, one for a WordPress site and another one for a resource created on Tilda.cc

Setting up internal site search in Google Analytics for WordPress

To enable internal site search on a WordPress site you will need to upgrade to the Business plan and install one of the plugins that leverages this functionality.

After that I suggest you test if the search is working properly and then move on to Google Analytics to set up the tracking.
1
Open Google Analytics interface https://analytics.google.com/
  • You should already have Google Analytics installed on your website. If no - check out this article to learn how to create a Google Analytics account and add it to your WordPress site.
2
Then go to Admin, View and pick View settings.
Google Analytics View Settings
3
It eliminates the risk of crashing your resource because of incorrectly embedded into the website tags.
View Setting Query parameter
4
Below the toggle you will see the Google Analytics Query parameter field. You may have one or multiple query parameters on your site.
  • If there are several of them, then just list them and separate by comma.
  • For example: if,query,q,n
Note: query parameters may be represented in a form of a word, or a letter.
5
To understand what query parameter you should use for your site, go to your web resource and type in any search query.
6
It doesn't matter if your search result is completed with either of these results:
  • positive (yes, something has been found!),
  • or negative (nope, there is no result that meets your search criteria).
7
Then go to the browser address bar and look for either a word or a letter that stands after the question mark (?) and before the equal sign (=), and is followed by your keyword.
  • For example: www.test.con/?s=test
8
You can see that in the screenshot below that I performed a search on Coupler.io blog, and the Query parameter in this case equals the letter "s".
WordPress: identifying Query parameter example
Another example is from Facebook internal search. In the case of Facebook, their Query parameter is "q".
Facebook Query parameter
9
Now you go back to Google Analytics interface, enter "s" into the Query parameter field, and press Save.
Save Google Analytics View settings

Testing internal site tracking in Google Analytics for WordPress

To test whether the internal site tracking works for your WordPress resource, go back to your site and perform search. Wait for 3 to 6 minutes, then revert back to Google Analytics main screen. Then navigate to Behaviour, Site Search, Search Terms.
Google Analytics search results tracking

Wrapping up

As always, I do hope you found this post useful! I would be happy if you decide to leave comments beneath this article! And talk to you soon!
comments powered by HyperComments
Made on
Tilda