Analytics
5.3K members online now
5.3K members online now
Dive into multiple domain (Cross/Sub) tracking, implementing Ecommerce and Enhanced Ecommerce, setting up Event tracking, and Universal Analytics code.
 
Guide Me
star_border
Reply

Site search Tracking with slash in front of parameters

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Has anyone had issues tracking site search parameters where there is a slash in front of the parameters?  If so, how did you resolve the issue so Google Analytics was able to track site search?

 

Our urls are formatted as follows:

http://sitename.com/search/?term=test&ctg=people

 

I believe our format with the '/' in front of the parameters is the reason that Google Analytics is unable to track any site searches.

 

I have a work-around working now using tag manager, but I would rather use the built-in functionality of Google Analytics to track site search.

 

Any help or recommendations greatly appreciated!

1 Expert replyverified_user
1 ACCEPTED SOLUTION

Accepted Solutions
Marked as Best Answer.
Solution
Accepted by topic author Michael D
May 2017

Site search Tracking with slash in front of parameters

Visitor ✭ ✭ ✭
# 4
Visitor ✭ ✭ ✭

In answer to my own question - I was able to trace the issue to the pageview tag in Google Tag Manager.  The pageview was legacy setup that was relying on outdated javascript.  The resulting mess was essentially omitting all query parameters from the URLs.

View solution in original post

Site search Tracking with slash in front of parameters

Top Contributor
# 2
Top Contributor

unless you have a conflicting filter, you should be collecting keywords.

If you're using GTM to pass a custom URL, you'll need to turn that off to debug.

VP & Chief Evangelist at Hub'Scan | Contact me
Level 80 Digital Analytics Warrior, KPI Therapist and Keeper of the One True Tagging Plan

Site search Tracking with slash in front of parameters

Follower ✭ ☆ ☆
# 3
Follower ✭ ☆ ☆

Hi Michael,

as mentioned by Julien. Perhaps there is a filter on the view, which

strips the search query parameters (term,ctg) out of the url?

Should it still not work for whatever reason, its easy possible to extract the search term via a custom filter. Thats the way I configured the site search on our website. Obviously you need the search queries also with this method. More about that in this great article from LunaMetrics http://www.lunametrics.com/blog/2015/02/24/enable-site-search-reporting-google-analytics/

Marked as Best Answer.
Solution
Accepted by topic author Michael D
May 2017

Site search Tracking with slash in front of parameters

Visitor ✭ ✭ ✭
# 4
Visitor ✭ ✭ ✭

In answer to my own question - I was able to trace the issue to the pageview tag in Google Tag Manager.  The pageview was legacy setup that was relying on outdated javascript.  The resulting mess was essentially omitting all query parameters from the URLs.