1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Google Analytics - PHP / TPL help

Discussion in 'Black Hat SEO' started by dribbleonline, Mar 22, 2011.

  1. dribbleonline

    dribbleonline Registered Member

    Joined:
    Mar 15, 2011
    Messages:
    85
    Likes Received:
    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....
     
  2. Autumn

    Autumn Elite Member

    Joined:
    Nov 18, 2010
    Messages:
    2,197
    Likes Received:
    3,041
    Occupation:
    I figure out ways to make money online and then au
    Location:
    Spamville
    Google Analytics isn't real time. If you google for "google analytics real time" there are a couple of hacks to work around this.
     
  3. dribbleonline

    dribbleonline Registered Member

    Joined:
    Mar 15, 2011
    Messages:
    85
    Likes Received:
    18
    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...
     
  4. Autumn

    Autumn Elite Member

    Joined:
    Nov 18, 2010
    Messages:
    2,197
    Likes Received:
    3,041
    Occupation:
    I figure out ways to make money online and then au
    Location:
    Spamville
    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.
     
  5. dribbleonline

    dribbleonline Registered Member

    Joined:
    Mar 15, 2011
    Messages:
    85
    Likes Received:
    18
    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.
     
  6. aReJay

    aReJay Power Member

    Joined:
    Apr 29, 2009
    Messages:
    736
    Likes Received:
    237
    Location:
    Down under
    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
     
  7. dribbleonline

    dribbleonline Registered Member

    Joined:
    Mar 15, 2011
    Messages:
    85
    Likes Received:
    18
    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?
     
  8. dribbleonline

    dribbleonline Registered Member

    Joined:
    Mar 15, 2011
    Messages:
    85
    Likes Received:
    18
    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.....