X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   Update Google Analytics to support Display Advertising (https://forum.x-cart.com/showthread.php?t=69213)

herber@wirehub.nl 05-21-2014 12:07 AM

Update Google Analytics to support Display Advertising
 
1 Attachment(s)
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.

xtech 07-09-2014 02:06 AM

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.

herber@wirehub.nl 07-09-2014 05:13 AM

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.

xtech 07-10-2014 11:09 PM

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

lildawg 07-13-2014 06:17 PM

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?

herber@wirehub.nl 07-14-2014 05:08 AM

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.

lildawg 07-19-2014 04:38 AM

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.

herber@wirehub.nl 07-21-2014 01:03 AM

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!


All times are GMT -8. The time now is 05:45 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.