Elxis CMS Forum

Support => Elxis 4.x/5.x DEV => Topic started by: maple on June 05, 2013, 15:47:31

Title: google analytics code - also prevent be tracked
Post by: maple on June 05, 2013, 15:47:31
Hi,

I just wanna paste the google analytics code. Is the best place just before the tag </head> in the index.php template file?

Any problems with APC or cache?

Or instead, where to place the code?
Code: [Select]
<?php include_once("analyticstracking.php"?> with google anatytics code pasted inside the file analyticstracking.php?

The best way?

thanks
Title: Re: google analytics code
Post by: webgift on June 05, 2013, 18:01:06
I think that the best way is the Asynchronous Syntax.
Here is a relative article about: https://developers.google.com/analytics/devguides/collection/gajs/
Title: Re: google analytics code
Post by: maple on June 06, 2013, 11:00:56

thanks

Also I just added inside the file hosts located at C:\windows\system32\drivers\etc\hosts the following code:

127.0.0.1 www.google-analytics.com
127.0.0.1 ssl.google-analytics.com

This prevent that my own visits to my website be tracked in google analytics for a dynamic ip internet connection like mine.

For now, it seems that work well.