Google Analytics Question

Discussion in 'Internet Marketing' started by rudradhar, Aug 6, 2013.

Thread Status:
Not open for further replies.
  1. rudradhar

    rudradhar
    uix_expand uix_collapse
    Member

    Joined:
    Jul 30, 2012
    Messages:
    267
    Likes Received:
    29
    Hey Guys,


    I have one doubt regarding Google Analytic. Does it make any difference if we put the tracking code in footer or header of a webpage.
     
  2. Mark T

    Mark T
    uix_expand uix_collapse
    Active Member

    Joined:
    Dec 28, 2011
    Messages:
    1,201
    Likes Received:
    230
    Hi rudradhar,

    Good question, and the answer to your question can be found here - https://support.google.com/analytics/answer/1008080?hl=en

    Follow the steps and it will tell you where the tracking code of google analytics should be or could be placed.

    You will see a boxed item there telling you where you can also add and position your scripts in your site for your tracking.


    Thanks,
    Mark T.
     
    • Like Like x 1
  3. abhi_garg

    abhi_garg
    uix_expand uix_collapse
    Member

    Joined:
    May 28, 2013
    Messages:
    140
    Likes Received:
    5
    Google want you to put your analytic code before </body> in footer. But it will work if you put in header I guess. I checked a site which has analytic code in their header part.

    Try this experiment and let us know the result
     
    • Like Like x 2
  4. Constantin

    Constantin
    uix_expand uix_collapse
    Member

    Joined:
    Jun 20, 2013
    Messages:
    213
    Likes Received:
    86
    It doesn't matter where you put it. It will still work.

    It was recommended to be put before </body> a while ago, as if it was in the <head> section, it could have increased the loading time of your page (the older analytics code had to do its job, first and after that the rest of the page was loaded). However, things have changed and you may want to place the code somewhere in the <head>, now, as the visitor counting will be more accurate (the new code and the webpage load simultaneously).
     
  5. spyindiaa

    spyindiaa
    uix_expand uix_collapse
    Member

    Joined:
    Apr 8, 2013
    Messages:
    53
    Likes Received:
    0
    the best method to put analytics code in website is before body , if you put the code at the top of body it increase your loading time
    and if visitor go back your from your site it dosent give accurate report of the visitors..
     
  6. Constantin

    Constantin
    uix_expand uix_collapse
    Member

    Joined:
    Jun 20, 2013
    Messages:
    213
    Likes Received:
    86
    As I said in my previous comment, the code does not influence the loading time of the page, anymore. Placing it just before the </body> would create a possible disadvantage if the page itself is quite big and it takes longer to load.
     
  7. TripBuildermedia

    TripBuildermedia
    uix_expand uix_collapse
    New Member

    Joined:
    Jul 23, 2013
    Messages:
    14
    Likes Received:
    0
    It doesn't matter the only reason to keep in header is that google can crawl it easily.. as the site loads
     
  8. AmbitiousStudent

    AmbitiousStudent
    uix_expand uix_collapse
    Member

    Joined:
    Aug 1, 2013
    Messages:
    79
    Likes Received:
    23
    ah yes the good ol days of trying to work out google analytics and webmasters. good luck my friend you have a long way to go
     
  9. altcom

    altcom
    uix_expand uix_collapse
    Member

    Joined:
    Sep 13, 2012
    Messages:
    440
    Likes Received:
    100
    Browser load a website from top to bottom, the advantage to place tracking code before </head> is help to track all bounce rate.
     
  10. SoftDev

    SoftDev
    uix_expand uix_collapse
    Member

    Joined:
    Sep 4, 2013
    Messages:
    97
    Likes Received:
    5
    Just put it under the <body> or before </body> and you're good to go.
     
  11. VishalBhatt123

    VishalBhatt123
    uix_expand uix_collapse
    Member

    Joined:
    Sep 5, 2013
    Messages:
    57
    Likes Received:
    4
    Many Developer put their Google analytic code at below the footer. It is habit and if you want to put the Google Analytic code to Header section of HTML than it is ok.
    There are no difference or any loss for putting your Google Analytic tracking code to Header or Footer.
     
  12. spyindia12

    spyindia12
    uix_expand uix_collapse
    New Member

    Joined:
    Jun 26, 2013
    Messages:
    24
    Likes Received:
    0
    not, big difference but necessary to put tracking code within <head></head>. you should put it there at the bottom, rather than up in the head because it makes your site faster.
     
  13. kevinkrieger

    kevinkrieger
    uix_expand uix_collapse
    Member

    Joined:
    Sep 5, 2013
    Messages:
    201
    Likes Received:
    7
    Put it in your header just before the closing </head> tag rather than at the end of the <body>
     
  14. ndirect

    ndirect
    uix_expand uix_collapse
    Member

    Joined:
    Jul 2, 2013
    Messages:
    48
    Likes Received:
    1
    I agree with the consensus on this thread, putting the code in the footer is just good practice. It not mandatory but still.
     
  15. TimeRider

    TimeRider
    uix_expand uix_collapse
    Active Member

    Joined:
    Apr 6, 2008
    Messages:
    2,761
    Likes Received:
    416
    I had put the Google Analytic in my footer of my site which worked. I don't think there is anything wrong to put it in footer or header.
     
  16. Fergal

    Fergal
    uix_expand uix_collapse
    Premium Member
    Premium Member

    Joined:
    Nov 18, 2007
    Messages:
    10,575
    Likes Received:
    1,165
    [Closing thread, please send me a PM if you would like it re-opened].
     
Thread Status:
Not open for further replies.

Share This Page