PDA

View Full Version : Administrative and Maintenance Tools - Adding Google Analytics to your Board


TheBlackPoet
03 May 2008, 00:56
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
03 May 2008, 02:55
Isn't it as simple as putting Google's code in your footer and verifying your account?

Ipuck
03 May 2008, 03:08
Isn't it as simple as putting Google's code in your footer and verifying your account?
I second that.

TheBlackPoet
03 May 2008, 03:26
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
03 May 2008, 04:26
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
03 May 2008, 14:04
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 May 2008, 03:15
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?

Chris-777
05 May 2008, 04:04
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
06 May 2008, 04:33
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
09 May 2008, 15:35
thanks for all this information.

PixelFx
10 May 2008, 03:25
just put the code in your header include and be done with it ..

attroll
10 May 2008, 06:23
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
12 May 2008, 11:06
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
12 May 2008, 12:43
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
13 May 2008, 00:31
So if I already have a registered email with google then I have an account I am assuming! Thanks so much!

thewatchdesk
13 May 2008, 20:00
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
14 May 2008, 02:44
why not to just add the google analytics code to the footer?

footer is loaded on all pages of a forum, right ?

:Judge:
14 May 2008, 19:10
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
14 May 2008, 19:12
why not to just add the google analytics code to the footer?

footer is loaded on all pages of a forum, right ?

yes :)

hotwheels
14 May 2008, 22:14
Thanks poet, i will give er a shot............appreciate you taking the time to write this up for us.

bxbigt
15 May 2008, 05:13
Thanks man!

:Judge:
23 May 2008, 14:41
Not working for me, please see my post above #18.

thewatchdesk
23 May 2008, 16:16
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:
24 May 2008, 01:17
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
24 May 2008, 07:03
sir is this

in the SEARCH FOR TEXT BOX, enter: (</body>}

right

:Judge:
24 May 2008, 08:00
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
26 May 2008, 09:28
I thought this mod was a nice reminder to add Analytics to our forums.

prof3ta
28 May 2008, 17:27
Thanks this was exactly what i needed.

hotwheels
30 May 2008, 21:15
awesome job poet.............thanks still works like a champ

BeFit4Free
18 Aug 2008, 04:19
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
19 Aug 2008, 23:54
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
08 Sep 2008, 20:38
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
11 Sep 2008, 23:39
google code has to between the head tags ,
i advice to search for <head>
and replace with
<head> + ur google code .

Brad Jones
12 Sep 2008, 01:49
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
11 Dec 2008, 20:59
you can just put the code in the footer template ...
so simple !

bbcentral
18 Dec 2008, 07:24
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
18 Dec 2008, 13:12
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.

fly
18 Dec 2008, 14:02
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
20 Dec 2008, 00:23
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.

fly
20 Dec 2008, 18:11
I challenge you to find </body> in the footer (on a default style anyway).

bbcentral
21 Dec 2008, 06:02
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
11 Jan 2009, 02:00
So, when I update forum to vBulletin v3.8.0, I have nothing to do? I mean, This MOD will continue working?

secrtagnt
22 Feb 2009, 02:15
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
22 Feb 2009, 02:16
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
07 Mar 2009, 20:01
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
26 May 2009, 14:42
Thank you so very much for this EXCELLENT hack!

mattwmc2001
25 Dec 2009, 06:52
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
25 Dec 2009, 18:00
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.