View Single Post
  #4  
Old 02-06-2012, 02:19 AM
  qualiteam's Avatar 
qualiteam qualiteam is offline
 

X-Guru
  
Join Date: Dec 2010
Posts: 6,373
 

Default Re: Internal Site Search Data in Google Analytics

Quote:
Originally Posted by Acquamarina
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/

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();
with this:
Code:
{if $main eq "search"} searchterms='{$search_prefilled.substring|escape}'; searchterms=searchterms.toLowerCase().replace(/\s/g,'+'); pageTracker._trackPageview('/search?q='+searchterms); {else} pageTracker._trackPageview(); {/if}

The second step (from the reported instructions) is still required.
__________________
Alex Solovev,
Qualiteam

---

User manual Video tutorials X-Cart FAQ

You are welcome to press "Thanks" button
if you find this post useful

Click here to learn how to apply patches

X-Cart Extensions
Reply With Quote