Google Analytics - PHP / TPL help

dribbleonline

Registered Member
Joined
Mar 15, 2011
Messages
88
Reaction score
18
Hey guys,

please can anyone help me with regards to setting up google analytics on my website.
My website is coded in php and has TPL template.

i have my base php file with the javascript from google analytics in....
and on the top of all my php files i have the include function for the above google php code....

any idea on what i am doing wrong as i am not getting any data on my google analysis........ even tho the status on the Google Analytics say that its getting data and is active?

data values have no changed in 3hours....
 
Google Analytics isn't real time. If you google for "google analytics real time" there are a couple of hacks to work around this.
 
thanks for the reply.

if its not realtime....what is the standard turnaround time for data to appear?

how does one test it if its working?
i see alot of the tests are for html and not php or tpl...
 
Typical refresh time is every 24 hours.

If you want real time analytics you can try the open source package Piwik.

I use Piwik on my SE sites (since it's self hosted, no nosey Google involvement) and I've just started using a paid service called Clicky for my PPC stuff.
 
wow, thanks alot man! def going to keep getclicky in mind!!!! looks dam awesome, esp with what phones visit your site!!

thanks for the help dude!

feel free to ask me if u need info or data.
 
Data is usually about 3 hours behind. Not too bad in my opinion.

Sounds like your using Smarty, in that case enclose your analytics code in

{literal}{/literal}

-aReJay
 
thank reejay,

so basically what you are saying is that i musnt use
./include ganalytics.php ?

would i put it in the template TPL or the PHP file?
 
anyone know the difference between the 2 :
1) PHP include for google analytics
2) {literal} {/Literal} function...


which one would be best? keeping in mind that the template is TPL.....
 
Back
Top