![]()  | 
	
	
		
 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 :( 
	 | 
	
		
 Re: Internal Site Search Data in Google Analytics 
		
		
		
		For 4.4.5 solution should be the same -> http://forum.x-cart.com/showpost.php?p=333333&postcount=4 
	 | 
	
		
 Re: Internal Site Search Data in Google Analytics 
		
		
		
		Hi there, 
	A couple of things: 1. There is a typo in the above code as there is a missing ] in: _gaq.push(['_trackPageview'); However, after correcting this it is still not showing GA. I have checked that the js variables are being set etc and they are but no show. Any other ideas? Thanks Matt  | 
	
		
 Re: Internal Site Search Data in Google Analytics 
		
		
		
		I've corrected the code. Thanks. 
	It takes about a day to get data shown on the Google side.  | 
	
		
 Re: Internal Site Search Data in Google Analytics 
		
		
		
		Last week I installed this patch on our 4.4.5 site and set the Google query value to "q". No search terms are being reported by Google Analytics.  Has anyone had success with the patch? 
	Quote: 
	
  | 
	
		
 Re: Internal Site Search Data in Google Analytics 
		
		
		
		Has anyone tried this with the new Universal code? 
	 | 
| All times are GMT -8. The time now is 06:39 PM. | 
	Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.