X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Internal Site Search Data in Google Analytics (https://forum.x-cart.com/showthread.php?t=56095)

qualiteam 03-13-2012 02:54 AM

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

Matthew Austin 06-22-2012 01:06 AM

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

qualiteam 06-22-2012 01:20 AM

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.

Thomasb134 05-16-2013 08:06 AM

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:

Originally Posted by qualiteam
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.


Sirch 06-04-2014 10:37 AM

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.