August 18th, 2013, 08:17 PM
Google analytics PHP Implementation
My index file is in the root and all supporting files are in a sub directory named HTML. The code I have in my index page is...
and it works fine. But I cannot get it to work on any of the supporting pages. The pages are in the same HTML directory as the analyticstracking.php file. I am using the following code..
<?php include_once("HTML/analyticstracking.php") ?>
I have tried including this line in the header and the body without success. I originally thought something was wrong with my PHP code. But now i'm starting to wonder if I have google analytics setup correctly. On the main page code page, I have all 4 addirional tracking settings off. But it should still be tracking all pages with tracking code under my main domain. Can anyone help me with this. Thanks.
<?php include_once("analyticstracking.php") ?>