satori83 — 2012-11-23T13:02:09-05:00 — #1
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
guido2004 — 2012-11-23T13:12:11-05:00 — #2
How about putting the google analytics code directly at the correct spot in the index.php?
satori83 — 2012-11-23T14:06:56-05:00 — #3
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