Results 1 to 2 of 2

Google Analytics Code in Header rather than Footer

This is a discussion on Google Analytics Code in Header rather than Footer within the General Discussion forums, part of the vBSEO SEO Plugin category; Hi.. I understand that the best place to include the Analytics code is at the end of the page, so ...

  1. #1
    Member
    Real Name
    Santiago
    Join Date
    Sep 2006
    Location
    Argentina
    Posts
    74
    Liked
    0 times

    Google Analytics Code in Header rather than Footer

    Hi..

    I understand that the best place to include the Analytics code is at the end of the page, so that it can only count "real visits" / 100% page load... (please correct me if I'm wrong)

    Since I'm having a little problem with my server response time, I would like to try using the Analytics Code in the Header rather than the footer template (I mean, in order to load first) because if a page take 10 seconds to load, and if the user clicks a link before the Analytics Code to load, I don't know if that is a valid visit/page view...

    So, just like a little experiment, I would like to change the place of the analytics code...

    I know I could put it manually on my header template, but it there's some option to change the position within vbseo options?

    Besides that, can it be true that the position of the code affects the visits tracking? (taking in consideration that a page could take up to 10 seconds to load)

    Thanks and sorry about my english!

  2. #2
    vBSEO Staff Oleg Ignatiuk's Avatar
    Real Name
    Oleg Ignatiuk
    Join Date
    Jun 2005
    Location
    Belarus
    Posts
    25,741
    Liked
    168 times
    Hello,

    this is not recommended since that may increase the page content load time even more.
    If you still want to do that for testing though, you should modify functions_vbseo.php file:
    FIND:
    PHP Code:
    $newtext preg_replace('#(</body>)#is',
    REAPLCE WITH:
    PHP Code:
    $newtext preg_replace('#()(<body.*?>)#is','\\2 

Similar Threads

  1. New Google Analytics Code
    By woostar in forum General Discussion
    Replies: 34
    Last Post: 05-11-2008, 06:01 AM
  2. Analytics code in header necessary?
    By Chris-777 in forum General Discussion
    Replies: 2
    Last Post: 05-05-2007, 11:08 AM
  3. Strange code / caracter injection above header / below footer *argh*
    By Doc Great in forum Off-Topic & Chit Chat
    Replies: 2
    Last Post: 02-22-2007, 02:57 PM
  4. How do I add the Google Analytics Code?
    By Lammypie in forum General Discussion
    Replies: 10
    Last Post: 05-22-2006, 08:08 PM
  5. 2.2.2/2.3.0 Google Analytics Code
    By Keith Cohen in forum Bug Reporting
    Replies: 4
    Last Post: 12-08-2005, 12:11 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •