View Full Version : Administrative and Maintenance Tools - Adding Google Analytics to your Board
TheBlackPoet
05-02-2008, 10:00 PM
What is Google Analytics?
Google Analytics (abbreviated GA) is a free service offered by Google that generates detailed statistics about the visitors to a website. Its main highlight is that a webmaster can optimize AdWords advertisement and marketing campaigns through the use of GA's analysis of where the visitors came from, how long they stayed on the website and their geographical position. {http://en.wikipedia.org/wiki/Google_Analytics}
Why is Analytics Important?
If you (the Board Owner) want to know what is really happening on your site and how best to optimize it to increase visitors and participation and hopefully...... get a conversion.... (make money).... then GA is an important tool for you...
furst
05-03-2008, 12:55 AM
Isn't it as simple as putting Google's code in your footer and verifying your account?
Ipuck
05-03-2008, 01:08 AM
Isn't it as simple as putting Google's code in your footer and verifying your account?
I second that.
TheBlackPoet
05-03-2008, 01:26 AM
no... if you put google in your footer... it will only read your pages... without conversions... it would be like putting it in a template... it works.., but when you want to measure more than simple page visits....., you put the code in the </body> and each page becomes unique..
so, no, its not that simple...
the idea behind analytics is to analyze.. to measure click-through rates.. conversions... if you just want a counter... get a counter...
Ipuck
05-03-2008, 02:26 AM
the idea behind analytics is to analyze.. to measure click-through rates.. conversions... if you just want a counter... get a counter... OK
Thanks
TheBlackPoet
05-03-2008, 12:04 PM
If the information seems to be overwhelming.., I will show you how to create a dashboard later today... Dash boards off you the chance to view specific data streams that are important to you on one page...
if i dont get back to this in time, I suggest you go to your google account and take a look at that option...
thewatchdesk
05-05-2008, 01:15 AM
In the directions, I think step two tells me to cut and paste the google code into each template, just before the </body>
But it sounds like step three is doing that with the replacement variable,
Is step 2 just telling me what step three is going to do?
Guest210212002
05-05-2008, 02:04 AM
This, to me, seems like the wrong way to go about it. Replacing the /body code with an RV for your analytics code + /body doesn't do anything different than just putting it in the footer. It's the same code.
vBSEO handles my Analytics code so I don't do it either way, but I fail to understand how making a RV would make one page unique any more or less than just hardcoding it into the footer. It's doing the same thing.
TheBlackPoet
05-06-2008, 02:33 AM
listen... trust me when i say this... if you put the code in the footer... you are doing the analytics a great dis-service... because the footer comes up no matter what page you go to.., you are not getting all of what GA is offering...
in order for analytics to work it has to be in a part of the site that is unique from other pages... the body pages are unique. when you put the code in the footer .. you are not getting the results such as site overlay, landing page, bounce rates.., etc....
but if you think its effective for you to put it in the footer... by all means.... do what you do!!
as far #7 is concerned...
In the directions, I think step two tells me to cut and paste the google code into each template, just before the </body>
But it sounds like step three is doing that with the replacement variable,
Is step 2 just telling me what step three is going to do?
no, dont manually put the code in each template... i believe what i meant to say was if you have more than one style........ do this.... but you have the right idea.. about the replacement variable.. that's what i suggested you do...
myown
05-09-2008, 01:35 PM
thanks for all this information.
PixelFx
05-10-2008, 01:25 AM
just put the code in your header include and be done with it ..
attroll
05-10-2008, 04:23 AM
I don't think it matters where you put the code as long as it is on the page being displayed. If it is in the footer then it is going to be on every page. Google does not just read the footer, it reads the content of the whole page. It does not matter where it gets put as long as it is on every page that gets displayed and the footer does that.
theparentpack
05-12-2008, 09:06 AM
Is this info only viewable to admins? This Noob needs instructions, I don't know what to do with the file sorry, too new, lol:o
KURTZ
05-12-2008, 10:43 AM
i don't remember who, but someone told me that the correct way is put the code in the footer ...
@parent: you need to register on google.com and get the code ... only who owns the google account can see the stats ...
theparentpack
05-12-2008, 10:31 PM
So if I already have a registered email with google then I have an account I am assuming! Thanks so much!
thewatchdesk
05-13-2008, 06:00 PM
Try this link, it should prompt you to set up an account (you can use yor existing gmail accounthttp://www.google.com/analytics/indexu.html
proxx
05-14-2008, 12:44 AM
why not to just add the google analytics code to the footer?
footer is loaded on all pages of a forum, right ?
:Judge:
05-14-2008, 05:10 PM
In step three is it supposed to be (</body>} placed in the field as instructed?
I did that but veiwing page source I do not see the code.
KURTZ
05-14-2008, 05:12 PM
why not to just add the google analytics code to the footer?
footer is loaded on all pages of a forum, right ?
yes :)
hotwheels
05-14-2008, 08:14 PM
Thanks poet, i will give er a shot............appreciate you taking the time to write this up for us.
bxbigt
05-15-2008, 03:13 AM
Thanks man!
:Judge:
05-23-2008, 12:41 PM
Not working for me, please see my post above #18.
thewatchdesk
05-23-2008, 02:16 PM
Not working for me, please see my post above #18.
I have the body tags in mine, I believe they need to be in there for it to work.
:Judge:
05-23-2008, 11:17 PM
I have the body tags in mine, I believe they need to be in there for it to work.
Thank you, I got it working now.
I had put (</body>} as the variable to be changed, WRONG. The correct text to be replaced is simply </body>.
msamm
05-24-2008, 05:03 AM
sir is this
in the SEARCH FOR TEXT BOX, enter: (</body>}
right
:Judge:
05-24-2008, 06:00 AM
sir is this
in the SEARCH FOR TEXT BOX, enter: (</body>}
right
No, that above is not right.
This is correct = in the SEARCH FOR TEXT BOX, enter: </body>
That is how it is working for my site anyway. :p
Cybermonsters
05-26-2008, 07:28 AM
I thought this mod was a nice reminder to add Analytics to our forums.
prof3ta
05-28-2008, 03:27 PM
Thanks this was exactly what i needed.
hotwheels
05-30-2008, 07:15 PM
awesome job poet.............thanks still works like a champ
BeFit4Free
08-18-2008, 02:19 AM
Doesn't vBSEO do this for you when you Enter your Google Analytics Code in the following format: UA-9999-1
If not, how do I change it?
TimberFloorAu
08-19-2008, 09:54 PM
I think what the Original Poster is stressing is:
you have 3 parts to your webpage.
Some stay the same some vary.
Header
Body/Main
Footer
Header and Footer are called via template on every page.
So as a page loads.
Header.... then body...then footer
If the Analytics code is within the footer, then its the last thing to load. Therefore it only replicates/analyses the simplest of information, and therefore essentially becomes a click counter.
Because it is not effectively tracking site activity on a page by page content by content basis.
However if the Analytics code is within the body.
The most important information ( main/body content ) is loading with the anlaytics code.
Thus giving more comprehensive results on page activity/content activity.
http://www.googlecommunity.com/forum/web-browsers-statistics/21884-analytics-code-placement.html#post119529
Seems must be before </body> tag
I wont use this code, as we have other analysis, but I think the OP has it right.
Just my opinion of course.
Ozzy
Brad Jones
09-08-2008, 06:38 PM
in order for analytics to work it has to be in a part of the site that is unique from other pages... the body pages are unique. when you put the code in the footer .. you are not getting the results such as site overlay, landing page, bounce rates.., etc....
I'd be pretty excited if I was wrong, so that I would have even more data to peruse, but I have the requisite GA code in my footer template, and I have data on all that you described. Have you actually tried it in the footer template and found a difference between that and placing it on each page before the </body> tag?
emath
09-11-2008, 09:39 PM
google code has to between the head tags ,
i advice to search for <head>
and replace with
<head> + ur google code .
Brad Jones
09-11-2008, 11:49 PM
google code has to between the head tags ,
i advice to search for <head>
and replace with
<head> + ur google code .
Which is why Google suggests you put it right before the </body> element? :rolleyes:
samiro
12-11-2008, 06:59 PM
you can just put the code in the footer template ...
so simple !
bbcentral
12-18-2008, 05:24 AM
I've been using the code in the footer of 2 forums and a regular website, and I have always seen plenty of data come through. It's always accurate too.
I haven't ever had any problems with it.
If Google was having incorrect data come through, by now they would have changed the instructions, but it still says to always add the code immediately before the /BODY tag.
I trust Google with their thousands of happy customers over some guy from Texas.
jdebler
12-18-2008, 11:12 AM
That guy in Texas knows exactly what he is talking about, especially in post #4. His advice there doesn't apply to everyone, and putting it in the footer works for what most people need it for, but he definitely isn't wrong.
What's the argument about? Google suggests putting it right before the </body> tag. You don't have to, but that's what they suggest...
bbcentral
12-19-2008, 10:23 PM
That guy in Texas knows exactly what he is talking about, especially in post #4. His advice there doesn't apply to everyone, and putting it in the footer works for what most people need it for, but he definitely isn't wrong.
With all due respect, he's completely wrong and hasn't got a clue what he's talking about. Maybe his knowledge comes from some different software package, or maybe he's used to some ancient version of Urchin before Google took over. I've spent considerable time using Analytics, I've read most of their documentation and successfully implemented it into several of my own forums and websites.
Fact #1: Analytics is supposed to track every page on your forum
Fact #2: Analytics is clever enough to be able to work out what page the visitor is currently looking at
Fact #3: Analytics can track conversions without modifying the code or placing it on only some pages. For example, if I want to track how many people register, I setup a "Goal" for register.php. Whenever someone goes to that page and ends up completing the registration, it tracks that as a conversion.
And here's Google's official documentation about Goals and Funnels:
https://www.google.com/support/googleanalytics/bin/answer.py?answer=55515&hl=en_US&utm_id=ad
And here's the documentation about Goals on dynamically generated pages:
https://www.google.com/support/googleanalytics/bin/answer.py?answer=55514&ctx=sibling
You'll notice that you configure everything through the Analytics website, not once does Google ask you to change your code. You use regular expressions, head or exact matches based on the URL of the page.
Google does all the work for you, so the correct instructions for this mod should be:
Open your footer template
Find </body>
Paste the code just before </body>
Save the template
If you don't believe me, try it out for yourself.
I challenge you to find </body> in the footer (on a default style anyway).
bbcentral
12-21-2008, 04:02 AM
I challenge you to find </body> in the footer (on a default style anyway).
OK So technically that's correct, because 'footer' is included just before the </body> tag.
Paste it just after this in your footer template:
<script type="text/javascript">
<!--
// Main vBulletin Javascript Initialization
vBulletin_init();
//-->
</script>
And it will appear before </body>.
My point still stands.
Sunka
01-11-2009, 12:00 AM
So, when I update forum to vBulletin v3.8.0, I have nothing to do? I mean, This MOD will continue working?
secrtagnt
02-22-2009, 12:15 AM
Google does all the work for you, so the correct instructions for this mod should be:
Open your footer template
Find </body>
Paste the code just before </body>
Save the template
If you don't believe me, try it out for yourself.
Seriously, they both work. The instructions for this mod are _not_ incorrect.
secrtagnt
02-22-2009, 12:16 AM
So, when I update forum to vBulletin v3.8.0, I have nothing to do? I mean, This MOD will continue working?
It should.
btotw
03-07-2009, 06:01 PM
Assuming your analytic results are w/n the same margin from month to month, why not try it both ways to settle the debate?
If you currently ONLY use it in the footer, try it the other way as the author suggests.
It will NOT reduce the analytic content if the author is incorrect.
But if he happens TO be correct...? :) :) :)
vithorius
05-26-2009, 12:42 PM
Thank you so very much for this EXCELLENT hack!
mattwmc2001
12-25-2009, 04:52 AM
Ok, at first I had this the codes installed in the footer - noticed they were not directly before the body tag.
When I used this mod they were.
I don't see how it is going to make much of a difference.
The footer is called for each page and google analytics knows via the url its a different page, no?
Matafleur
12-25-2009, 04:00 PM
Google recommends you place the analytics javascript before the </body> tag so that if the Analytics web server is down or slow to load, the content on your website still renders normally rather than present a blank page while it's waiting a minute or so for the HTTP request to Google to timeout.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.