GA on index.php

Discussion in 'White Hat SEO' started by KlaAz0r, Jul 20, 2011.

  1. KlaAz0r

    KlaAz0r BANNED BANNED

    Joined:
    Jan 11, 2011
    Messages:
    721
    Likes Received:
    852
    does any one know how I get Google analytics on my index.php file?

    thanks!
     
  2. hurn

    hurn BANNED BANNED

    Joined:
    Jan 21, 2009
    Messages:
    696
    Likes Received:
    191
    get code from analytics and post it to your header.( between header tags)
     
  3. Orbit143

    Orbit143 Senior Member

    Joined:
    Aug 8, 2010
    Messages:
    895
    Likes Received:
    591
    Location:
    /home
    AFAIK analytics code should be at the end of page, right after the </body> tag. If youre using wordpress place the code into footer.php
    (I read this in google help so it should be correct)
     
  4. KlaAz0r

    KlaAz0r BANNED BANNED

    Joined:
    Jan 11, 2011
    Messages:
    721
    Likes Received:
    852
    it's not a WP site just only the index.php
     
  5. misulicus

    misulicus Regular Member

    Joined:
    Jan 31, 2010
    Messages:
    251
    Likes Received:
    118
    put the tracking code inside a file, analytics.php
    then before closing ?>
    add:
    include 'analytics.php';
    see if it works