Discuss regaining access to Analytics accounts, restoring accounts, changing user access levels, and navigating the homepage
 
Guide Me
star_border
Reply

in site search

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hello everyone,

 

Sorry for my poor English writing skills. 

 

Since I am working with a site where the in site search is really important it would be lovely to track the words who resulted in "no results" page's. It's a site what uses wordpress (a search try contains /?s instead of /?q)

I already tried some ways to get there, but none ended up positive. 

 

so i would like to know every possible way to track those no-results page's. My preference goes towards implementing a trackingcode. But I am open for other non-analytics possibilities aswell. 

 

Thanks

1 Expert replyverified_user

Re: in site search

Top Contributor
# 2
Top Contributor
Hi Dion,

if you do not have that info available in the site URL or Page title you will probably need additional coding to pass the no result info.

This can be done in multiple ways:
1. Add an event which will fire if on a page where an element exists which contains the info that there were no search result - you'll need some js to get this running
2. Append the query portion of the URL - in specific the s parameter with the suffix or prefix no results so instead of search query 'nothing useful' you will actually report on '0 - nothing useful'
3. Add a custom dimension which will store the keyword where there is no search result present

All of this methods usually rely on the fact that there is a DOM element present which clearly states - 0 search results or similar. My advice is to use Google Tag Manager to do this - well do the entire tracking but it becomes much much easier.

For instance if you want to track it with an event:
1. Create a GA template tag for an event
2. Create a URL query portion variable which will read the value of s parameter
3. Create a variable which will find an element which says '0 search results'
4. Create a trigger which will be a pageview DOM and the variable from step 3 contains the string or is present
5. And that's itSmiley Happy

Hope it helps!

Kind regards,
Zorin
Web analyst @ escapestudio.net