1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Google Analytics on PhpBB3

Discussion in 'Google' started by vpdesigns, Feb 21, 2009.

  1. #1
    Not sure if it goes here but correct me if i'm wrong. I added my analytics code in index_body.html and waited 24 hours to see any update. Nothing has changed. Then i tried put it in index.php - just caused me errors.

    Where would i put the code?
     
    vpdesigns, Feb 21, 2009 IP
  2. events

    events Active Member

    Messages:
    391
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    73
    #2
    try in the overall footer
     
    events, Feb 21, 2009 IP
  3. kber

    kber Well-Known Member

    Messages:
    888
    Likes Received:
    16
    Best Answers:
    0
    Trophy Points:
    110
    #3
    open your style file : overall_footer.html
    find
    </html>
    add before :
    your Google analytic code
     
    kber, Feb 22, 2009 IP
  4. zlib

    zlib Active Member

    Messages:
    6
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    96
    #4
    Should add before </body>
     
    zlib, Feb 22, 2009 IP
  5. kber

    kber Well-Known Member

    Messages:
    888
    Likes Received:
    16
    Best Answers:
    0
    Trophy Points:
    110
    #5
    NO . it should be between </body> and </html>
     
    kber, Feb 22, 2009 IP
  6. tendulkar2

    tendulkar2 Banned

    Messages:
    2,617
    Likes Received:
    69
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Just open the overall_footer... There you can see the copyright information of phpbb.. Just add the code after that.
     
    tendulkar2, Feb 22, 2009 IP
  7. freebiefinder

    freebiefinder Peon

    Messages:
    431
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #7
    between the body and html
     
    freebiefinder, Feb 22, 2009 IP
  8. aap

    aap Well-Known Member

    Messages:
    1,802
    Likes Received:
    39
    Best Answers:
    2
    Trophy Points:
    120
    #8
    yes, of theme you are using.

    you can also add in overall_header.php file.
     
    aap, Feb 22, 2009 IP
  9. kber

    kber Well-Known Member

    Messages:
    888
    Likes Received:
    16
    Best Answers:
    0
    Trophy Points:
    110
    #9
    there is no file called overall_header.php :rolleyes: you may mean overall_header.html
     
    kber, Feb 22, 2009 IP
  10. aap

    aap Well-Known Member

    Messages:
    1,802
    Likes Received:
    39
    Best Answers:
    2
    Trophy Points:
    120
    #10
    yes, overall_header.html

    Sorry, actually I don't have phpbb based forum.
     
    aap, Feb 22, 2009 IP
  11. joebert

    joebert Well-Known Member

    Messages:
    2,150
    Likes Received:
    88
    Best Answers:
    0
    Trophy Points:
    145
    #11
    You guys saying to put it between the </body> and </html> are simply wrong.
    There are only two things that should ever go directly inside of the <html></html>, those are <head> and <body>, both of which can contain further child elements.

    zlib is right, it goes directly before </body>. It can go anywhere else within <head> or <body>, but placing it as close to the end as possible limits any impact that could be caused by a slowdown on the Analytics servers.

    For phpBB3, in overall_footer.html, if using the default prosilver template, it would look something like this.

    <div>
    	<a id="bottom" name="bottom" accesskey="z"></a>
    	<!-- IF not S_IS_BOT -->{RUN_CRON_TASK}<!-- ENDIF -->
    </div>
    <script type="text/javascript">
    var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
    document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
    </script>
    <script type="text/javascript">
    var pageTracker = _gat._getTracker("UA-1234567-8");
    pageTracker._trackPageview();
    </script>
    </body>
    </html>
    Code (markup):
     
    joebert, Feb 22, 2009 IP
  12. vpdesigns

    vpdesigns Peon

    Messages:
    353
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #12
    Well between </body> and </html> worked so i guess it aint wrong ;) thanks for the help everyone.
     
    vpdesigns, Feb 22, 2009 IP
  13. joebert

    joebert Well-Known Member

    Messages:
    2,150
    Likes Received:
    88
    Best Answers:
    0
    Trophy Points:
    145
    #13
    Driving a car in reverse will still get me from point A to point B, but that doesn't mean it's the correct way to drive a car. ;)

    Go ahead and screw your site up if you want, but when you start wondering why browsers act all quirky when you try to change something in the design later, be sure to remember this thread. :D
     
    joebert, Feb 23, 2009 IP
  14. Spawny

    Spawny Well-Known Member

    Messages:
    252
    Likes Received:
    23
    Best Answers:
    0
    Trophy Points:
    110
    #14
    you should be putting it inside the body or the head..
     
    Spawny, Feb 23, 2009 IP
  15. tigermouse

    tigermouse Peon

    Messages:
    1
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #15
    Put the google analytics code at the bottom of the code for each page you want stats for. For exact placement, the google analytics help page should tell you.
     
    tigermouse, Feb 23, 2009 IP
  16. sumit1710

    sumit1710 Peon

    Messages:
    648
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #16
    just add above </body> tag
     
    sumit1710, Feb 23, 2009 IP
  17. zlib

    zlib Active Member

    Messages:
    6
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    96
    #17
    NO . it should be before </body>


    :rolleyes:
     
    zlib, Feb 23, 2009 IP
  18. seocipl

    seocipl Member

    Messages:
    735
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    33
    #18
    Perfect way End of the Body Tag
    Ex:
    <body>
    All Content after
    Google Analytic code
    </body>
     
    seocipl, Feb 23, 2009 IP