Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

The Google Forum


You are currently viewing our The Google Forum as a guest. Please register to participate.
Login



Reply
google analytics code
Old 12-23-2009, 05:47 PM google analytics code
Ultra Talker

Posts: 254
Trades: 0
is it a good idea to place the google analytics javascript code at the very bottom of the page just before

</body>

or should it be within the <head> and </head>
sudhakararaog is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 12-23-2009, 06:06 PM Re: google analytics code
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,380
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Yes it is.

Ideally it needs to be the LAST thing to load. That way the page is fully loaded before the view count is registered, and should the connection to Google be slow for any reason it does NOT impact on the visitors "experience" by causing the page NOT to load.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 12-23-2009, 07:08 PM Re: google analytics code
Ultra Talker

Posts: 254
Trades: 0
thanks for letting me know
sudhakararaog is offline
Reply With Quote
View Public Profile
 
Old 12-24-2009, 12:08 AM Re: google analytics code
Ultra Talker

Posts: 254
Trades: 0
i am working on a static website which is hosted on linux and php and mysql. i am creating the html and css part of the website

all the pages in the website have a common section for example top portion has header links and bottom has footer links

so i thought it would be a good idea to have header.php and header.php that way any change that needs to be done can be done to these 2 files instead of changing all the files in the website

about the google analytics code after getting your response i want to add this google analytics code at the bottom of every page just before </body> tag this way each page's statistic details can be viewed by logging into google account


however since i want to have footer.php i want to include the footer links and then the google analytics code followed by </body></html> in footer.php

my question is if i were to do it this way, when google analytics javascript code which is only in 1 file footer.php though this file will be called in all other pages(about.php, services.php...) of the website as
include("footer.php");

will the analytics code still analyse traffic information for each and every page of the website(index.php, about.php, services.php ...)

please advice

thanks
sudhakararaog is offline
Reply With Quote
View Public Profile
 
Old 12-24-2009, 01:31 AM Re: google analytics code
The Leader's Avatar
Skilled Talker

Posts: 53
Name: Michael
Trades: 0
Just follow googles instructions and it will work!
__________________
Regards The Leader

Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE
The Leader is offline
Reply With Quote
View Public Profile
 
Old 12-24-2009, 01:31 AM Re: google analytics code
Extreme Talker

Posts: 185
Trades: 0
just don't put the code in <head></head> because I remember once google analytics servers went down and all sites that had the code in head could not load.
__________________

Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE
weker is offline
Reply With Quote
View Public Profile
 
Old 12-24-2009, 01:47 AM Re: google analytics code
Ultra Talker

Posts: 254
Trades: 0
thanks for replying

i will use the analytics code only before </body> tag and not between
<head></head>

about the question i asked about placing the analytics code in footer.php and all the files in the website would call this file as
include("footer.php");

by doing this will each page of the website be analysed indivdually
sudhakararaog is offline
Reply With Quote
View Public Profile
 
Old 12-24-2009, 04:05 AM Re: google analytics code
mma
Average Talker

Posts: 22
Name: ryan
Trades: 0
Sometimes I put my google analytics code at the footer.
__________________

Please login or register to view this content. Registration is FREE
mma is offline
Reply With Quote
View Public Profile
 
Old 12-28-2009, 12:48 PM Re: google analytics code
Average Talker

Posts: 17
Name: Katherine
Trades: 0
This is interesting- I usually put it before </body> tag too. Sounds like there are other options out there. Gonna try putting it at the footer as well.
__________________
There's nothing sexier than a
Please login or register to view this content. Registration is FREE
and nothing more sturdy than a big old
Please login or register to view this content. Registration is FREE
Carminator is offline
Reply With Quote
View Public Profile
 
Old 12-28-2009, 09:18 PM Re: google analytics code
Super Talker

Posts: 109
Name: James Spooling
Trades: 0
It doesn't matter if you out the code on the lower part. The important is it will function well and track your daily site transaction.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
ContentSpooling is offline
Reply With Quote
View Public Profile Visit ContentSpooling's homepage!
 
Reply     « Reply to google analytics code
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.30249 seconds with 12 queries