I am not really a php guy, so please bear with me....
I was asked by a friend who does some seo for people to include Google Analytics in a site he was doing and the site is in php. I read that it could be installed in either the header.php or footer.php. I went for the footer because of how they set up the includes files but it apparently isnt working. I checked some resources online and it says that if it's in the header it needs to be before the closing head tag, if in footer then before the closing body tag. When I look at where the include header is, its after the first body tag and inside the first div. They put all the meta info in each page, the header.php only contains some navigation and search bar elements. The footer is included before the last closing div, so that wouldn't pull the GA script in the right spot either. I am assuming this is why no analytics are registering. Does anyone have insight on this? Should I rearrange the includes? the site is 5starinks.com
How about putting the google analytics code directly at the correct spot in the index.php?
I could do that but I would need to do that on every php page. Although now the guys telling me that it is tracking.. The issue is the second analytics snippet that's for the ppc goal tracking on the orderconfirmation.php page. So I'll have to check that when I get home.
Sent from my Nexus 4 using Tapatalk 2
This topic is now closed. New replies are no longer allowed.