Google Analytics Code

Discussion in 'Google' started by sprabhu, Oct 2, 2008.

  1. #1
    Hi,

    Can i paste google analytic code in .php files that doesn't have end </body> tag.
    if yes, Will it work or not?
     
    sprabhu, Oct 2, 2008 IP
  2. javaongsan

    javaongsan Well-Known Member

    Messages:
    1,054
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    128
    #2
    place it outside of
    <?php
    ?>
     
    javaongsan, Oct 3, 2008 IP
  3. dcristo

    dcristo Illustrious Member

    Messages:
    19,776
    Likes Received:
    1,200
    Best Answers:
    7
    Trophy Points:
    470
    Articles:
    7
    #3
    Place just before </body> tag.
     
    dcristo, Oct 3, 2008 IP
  4. nandalinnaung

    nandalinnaung Peon

    Messages:
    920
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #4
    nandalinnaung, Oct 3, 2008 IP
  5. flatroxs

    flatroxs Banned

    Messages:
    396
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #5
    You Post this Code outside of <?php
     
    flatroxs, Oct 3, 2008 IP
  6. pawanpandey78

    pawanpandey78 Peon

    Messages:
    186
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Hi,

    Just post it to in the last when your php tag is end.
    or just above the footer part
     
    pawanpandey78, Oct 3, 2008 IP
  7. IEmailer.com

    IEmailer.com Well-Known Member

    Messages:
    1,864
    Likes Received:
    27
    Best Answers:
    0
    Trophy Points:
    110
    #7
    Yes you can, just place the tracking code out of the PHP tags.
     
    IEmailer.com, Oct 3, 2008 IP
  8. Mr Goldwing

    Mr Goldwing Well-Known Member

    Messages:
    519
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    108
    #8
    Make sure that you dont put in into a separate footer file otherwise it will show on every page of your site.
     
    Mr Goldwing, Oct 3, 2008 IP