Track Searches With Google Analytics
November 3rd, 2007 at 3:19 PM (17 years ago) by Matt FreedmanGoogle has rolled out a new feature in Google Analytics. You are now able to track searches that have been made on your site. This means that if your site, blog or forums has built-in search, you’ll be able to get some statistics for it.
I think that this new feature will be quite helpful to many people. You’ll be able to see what people are search for and possibly adjust things accordingly. You’ll also be able to see any refined searches by the same visitor, which will help you in seeing how effective your site, blog or forums search is.
How the tracking works is that you tell Google Analytics what URL parameter your search uses, and it’ll start to track all the searches on your site. If you already have Analytics tracking your site, no additional code is required. Just a note, Site Search tracking is not enabled by default. Also, it’s currently only available for English Analytics accounts, but Google says that it should be more widely available soon.
Here’s how you enable it, and configure it to work with WordPress.
- Login to Google Analytics
- Under “Website Profiles“, find the site you want to enable Site Search tracking on, and click the “Edit” link corresponding to it
- On the Profile Settings page, click the edit link for “Main Website Profile Information“
- Find the section called “Site Search“
- Click the radio button “Do Track Site Search“
- In the input box that pops up, enter in “s“
- Decide whether or not you want Analytics to strip out the parameter stuff when displaying it to you. I chose for it to not to.
- Leave the question “Do you use categories for site search?” as no
- Click Save Changes
There you have it. Google Analytics will start tracking any searches made on your site right away. This is assuming that WordPress is still using the default format of “?s=search+term” for searching. If someone searches in a specific category in your site, it should show up in Google Analytics as “/category/cat-name/?s=search+term” (assuming that’s have your permalinks are setup).
To see your Site Search reports, go to the Reports of the site you enabled this on, click on “Content” in the sidebar, then click on “Site Search” under the Content menu.
Enjoy your Site Tracking (oh, and try not to become mesmerised in the reports 😛 )!
Find something useful here? Feel free to help me out by sending a donation. :)
Leave a Reply