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

Update Google Analytics to support Display Advertising

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #1  
Old 05-21-2014, 12:07 AM
 
herber@wirehub.nl herber@wirehub.nl is offline
 

eXpert
  
Join Date: Nov 2002
Posts: 305
 

Default Update Google Analytics to support Display Advertising

This patch will change the Google Analytics (GA) link as suggested by Google here to support the Display Advertising network.

This will add new statistics to your Google Analytics stats, such as demographic stats.
You can find more info on the different types of Google Analytics here.

I'm assuming you're already using the asynchronous version of GA, because you should. It speeds up your site as it doesn't have to wait for GA to load.

Be sure to make the following file writeable (chmod 666):
/skin/common_files/modules/Google_Analytics/ga_code_async.tpl
And set it back to read only (chmod 644) after finishing the patch.

Next, activate this in Google Analytics by for example accessing the Age demographic in Google Analytics, it will ask you to upgrade your tracking code (which this patch does) and click to validate.
Done.

Save the patch, as you can use it to revert the changes, in case you want to upgrade X-Cart.
Attached Files
File Type: txt Google_Analytics_patch.txt (872 Bytes, 336 views)
Reply With Quote

The following 3 users thank herber@wirehub.nl for this useful post:
Holiday (05-22-2014), totaltec (05-21-2014), xtech (07-09-2014)
  #2  
Old 07-09-2014, 02:06 AM
 
xtech xtech is offline
 

X-Adept
  
Join Date: Jun 2010
Posts: 605
 

Default Re: Update Google Analytics to support Display Advertising

Quote:
Originally Posted by herber@wirehub.nl
This patch will change the Google Analytics (GA) link as suggested by Google here to support the Display Advertising network.

This will add new statistics to your Google Analytics stats, such as demographic stats.
You can find more info on the different types of Google Analytics here.

I'm assuming you're already using the asynchronous version of GA, because you should. It speeds up your site as it doesn't have to wait for GA to load.

Be sure to make the following file writeable (chmod 666):
/skin/common_files/modules/Google_Analytics/ga_code_async.tpl
And set it back to read only (chmod 644) after finishing the patch.

Next, activate this in Google Analytics by for example accessing the Age demographic in Google Analytics, it will ask you to upgrade your tracking code (which this patch does) and click to validate.
Done.

Save the patch, as you can use it to revert the changes, in case you want to upgrade X-Cart.

Thanks for your codes.Now can i make Google_Analytics_patch.txt to Google_Analytics_patch.diff and run the patch from admin Patch/Upgrade center in Apply patch section?

Thanks again.
__________________
X-cart Platinum
4.6.1
Reboot template
Reply With Quote
  #3  
Old 07-09-2014, 05:13 AM
 
herber@wirehub.nl herber@wirehub.nl is offline
 

eXpert
  
Join Date: Nov 2002
Posts: 305
 

Default Re: Update Google Analytics to support Display Advertising

Quote:
Originally Posted by xtech
Thanks for your codes.Now can i make Google_Analytics_patch.txt to Google_Analytics_patch.diff and run the patch from admin Patch/Upgrade center in Apply patch section?

Thanks again.
Yep you're right, but you can also use it without renaming it to .diff.
It's just a text file, the extension doesn't matter, you can run it (be sure the file has write rights) and that's it.
__________________
X-Cart 4.7.12
Reply With Quote
  #4  
Old 07-10-2014, 11:09 PM
 
xtech xtech is offline
 

X-Adept
  
Join Date: Jun 2010
Posts: 605
 

Default Re: Update Google Analytics to support Display Advertising

Quote:
Originally Posted by herber@wirehub.nl
Yep you're right, but you can also use it without renaming it to .diff.
It's just a text file, the extension doesn't matter, you can run it (be sure the file has write rights) and that's it.

I have PM you the code.please check and add whatever required.

Thanks,
xtech
__________________
X-cart Platinum
4.6.1
Reboot template
Reply With Quote
  #5  
Old 07-13-2014, 06:17 PM
  lildawg's Avatar 
lildawg lildawg is offline
 

X-Adept
  
Join Date: Jan 2003
Location: Utah
Posts: 686
 

Default Re: Update Google Analytics to support Display Advertising

I was trying to run this update and I get an error saying "ga_code_async.tpl - Not Found" even thought I know it is there as I changed the permissions on it to 666 as I was supposed to do. Any ideas as to what is going on?
Reply With Quote
  #6  
Old 07-14-2014, 05:08 AM
 
herber@wirehub.nl herber@wirehub.nl is offline
 

eXpert
  
Join Date: Nov 2002
Posts: 305
 

Default Re: Update Google Analytics to support Display Advertising

Quote:
Originally Posted by lildawg
I was trying to run this update and I get an error saying "ga_code_async.tpl - Not Found" even thought I know it is there as I changed the permissions on it to 666 as I was supposed to do. Any ideas as to what is going on?

Yep, you're using an older version, so it isn't the same file.
My patch is written for X-Cart 4.6.x

Xtech was using 4.5.x and I don't what you're using, but if you post the file 'ga_code_async.tpl', I will write a patch for you.
__________________
X-Cart 4.7.12
Reply With Quote
  #7  
Old 07-19-2014, 04:38 AM
  lildawg's Avatar 
lildawg lildawg is offline
 

X-Adept
  
Join Date: Jan 2003
Location: Utah
Posts: 686
 

Default Re: Update Google Analytics to support Display Advertising

I am using 4.6.3 but I just went in and manually fixed the code myself but thanks for the offer of writing the script to fix it.
Reply With Quote
  #8  
Old 07-21-2014, 01:03 AM
 
herber@wirehub.nl herber@wirehub.nl is offline
 

eXpert
  
Join Date: Nov 2002
Posts: 305
 

Default Re: Update Google Analytics to support Display Advertising

Quote:
Originally Posted by lildawg
I am using 4.6.3 but I just went in and manually fixed the code myself but thanks for the offer of writing the script to fix it.
Alright strange, then the file should have been present.

As long as it works right now, good to hear you fixed it!
__________________
X-Cart 4.7.12
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions



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 12:11 PM.

   

 
X-Cart forums © 2001-2020