Elxis CMS Forum
Support => Elxis 4.x/5.x DEV => Topic started 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? <?php include_once("analyticstracking.php") ?>
with google anatytics code pasted inside the file analyticstracking.php?
The best way?
thanks
-
I think that the best way is the Asynchronous Syntax.
Here is a relative article about: https://developers.google.com/analytics/devguides/collection/gajs/
-
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.