Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Internal Site Search Data in Google Analytics

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #11  
Old 03-13-2012, 02:54 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

For 4.4.5 solution should be the same -> http://forum.x-cart.com/showpost.php?p=333333&postcount=4
__________________
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
  #12  
Old 06-22-2012, 01:06 AM
  Matthew Austin's Avatar 
Matthew Austin Matthew Austin is offline
 

Newbie
  
Join Date: Sep 2011
Posts: 4
 

Default 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
__________________
X-Cart 4.4
Reply With Quote

The following user thanks Matthew Austin for this useful post:
qualiteam (06-22-2012)
  #13  
Old 06-22-2012, 01:20 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

I've corrected the code. Thanks.
It takes about a day to get data shown on the Google side.
__________________
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
  #14  
Old 05-16-2013, 08:06 AM
 
Thomasb134 Thomasb134 is offline
 

X-Adept
  
Join Date: Apr 2007
Location: USA
Posts: 789
 

Default 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.
__________________
Thomas / USA
XCart V4.4.5 Gold
XCart Mobile V1.4.12
XCart X-PDF
XCart X-HotProducts
AlteredCart Checkout One (One Page Checkout)
BCSE Back In Stock
CFL Holiday Message
CFL System Message
Smack Digital (WebsiteCM) Remember Anon Carts
xcartmods Testimonials
xcartmods reCAPTCHA for X-Cart Classic
Unix, PHP 7.0 (patched 5.4).
MySQL 5.6
Reply With Quote
  #15  
Old 06-04-2014, 10:37 AM
 
Sirch Sirch is offline
 

Member
  
Join Date: Jan 2009
Posts: 17
 

Default Re: Internal Site Search Data in Google Analytics

Has anyone tried this with the new Universal code?
__________________
X-Cart version 4.5.4
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 10:59 AM.

   

 
X-Cart forums © 2001-2020