![]() |
Internal Site Search Data in Google Analytics
Hi There
Brand new member to the forums here posting for the first time - hoping someone has some experience with this as I've spent a lot of time banging my head against this particular wall. :? I'd like to be able to track internal site search terms within Google Analytics, but so far am having no luck. It looks like the analytics data is looking for a particular query parameter like a "q" or "s", but of course the search results URL doesn't show this type of thing - only http://www.domainname.com/search.php?mode=search&page=1". Does anyone know what changes I'd need to make, and to which template files? I have the latest Asynch GA code already in place. Thanks very much! Kathy |
Re: Internal Site Search Data in Google Analytics
Hi Kathy,
Did you ever figure this one out? Thanks, Jason |
Re: Internal Site Search Data in Google Analytics
Found this through another post. The code is very different on 4.4.4. Will it work?
http://www.squeezejuicemarketing.com/blog/capture-site-search-terms-in-x-cart-w-google-analytics/ |
Re: Internal Site Search Data in Google Analytics
Quote:
For 4.4.x you can try altering the "skin/common_files/modules/Google_Analytics/ga_code.tpl" template and replace this code: Code:
pageTracker._trackPageview();Code:
{if $main eq "search"}The second step (from the reported instructions) is still required. |
Re: Internal Site Search Data in Google Analytics
Thanks, Alex, I'll do the changes and report back tomorrow.
|
Re: Internal Site Search Data in Google Analytics
Forgot to ask - the query parameter is "q", as in the fix from squeezejuice?
|
Re: Internal Site Search Data in Google Analytics
Quote:
Yes |
Re: Internal Site Search Data in Google Analytics
Thanks Alex,
What about if we are using GA Async mode? What should be the change in this case? Regards, Nacho. |
Re: Internal Site Search Data in Google Analytics
The regular async script looks like this:
Code:
<script type="text/javascript">I suppose you use 4.0.x, thus in skin1/customer/home.tpl before the Google tracking code appears, add this: Code:
{if $main eq "search"}Change the tracking code like this: Code:
<script type="text/javascript"> |
Re: Internal Site Search Data in Google Analytics
Thanks Alex, but my question was for x-cart version 4.4.5 :(
|
| All times are GMT -8. The time now is 10:32 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.