PDA

View Full Version : Statistics Modifications - [Mod-Mall] Google Analytics with User Info and Site Speed!


nitra1000
05-25-2011, 10:00 PM
What Google Analytics Does
For those of you not in the know... Google Analytics allows you to track site visits, bounce rate, content, users, along with dozens of other metrics... Even tying in with adsense/adwords.

It has now introduced Site Speed into the mix

What This Mod Does
This mod inserts the javascript in your header template, saving you from having to edit or revert your templates every upgrade.

It Also

Adds whether the visitor is Guest or Member (Available as a Custom Varible, and used with Segments)
Adds the code necessary to record Site Speed (Available in the Google Analytics Public Beta)



How to install

Import the xml
Register at google.com/analytics (http://google.com/analytics),and configure your site (if you haven't already)
Find you UA number in the profile list
copy and paste this into the UA field found in your admincp under Settings>Options>Google Analytics Script
Activate and configure the add on in the same screen


How to upgrade

Import the xml, set overwrite to allow/yes/on
Check the settings at Settings>Options>Add Wibiya Script



Releases
V0.5 - Pre-Release
v1.0 - Release

Notes
I have nothing to do with Google, I just needed this for my forum and thought I would be nice.... By installing this mod you agree that I am in no way responsible for what it does good or bad to your website, or reporting,your dog or anything else for that matter.

Support / Branding
I provide vBulletin Mods for zero costs. To help me please leave the modification footer link alone, unless you support this modification with a 15$ minimum donation.

If you choose to support me, I will contact you via the email provided by paypal with instructions on how to remove the footer note.

A link to Supporting me ("Support Developer") can be found on the top right area of this post.


Instructions for viewing the data
Instructions for viewing the data inside Google Analytics can be found on my own website

Viewing Custom Variables In Google Analytics (http://mod-mall.com/topic/10-viewing-custom-variables-in-google-analytics/)
Measure Site Speed With Google Analytics (http://mod-mall.com/topic/9-measure-site-speed-with-google-analytics/)


Like This Mod?
Mark as Install
Nominate for Mod of the Month
Consider a Donation

nitra1000
05-25-2011, 10:30 PM
Reserved

ssslippy
05-26-2011, 12:45 AM
Shouldn't the javascript be in the footer to reduce page load time?

nitra1000
05-26-2011, 06:34 AM
Nope this uses the asynchronous code which is the fastest available

Kraxell
05-26-2011, 06:59 AM
Thx, will give it a try :)

Paul M
05-26-2011, 07:31 AM
Remove this threat from your plugin.

Consider yourself warned - this is unacceptable.

// DO NOT MODIFY THIS WITHOUT MY EXPRESS PERMISSION A LINK FREE VERSION WILL BE AVAILABLE SOON
// IF YOU DO MODIFY IT OTHER SCRIPTS MAY FIRE WHICH MAY HURT YOUR FORUM CONSIDER YOURSELF WARNED

betts02
05-26-2011, 07:54 AM
Does this track just the home page or every page ?

I used the code before and placed in in my header template

nitra1000
05-26-2011, 07:54 AM
@Paul Removed :) Just an idel threat made after losing over 500,000 links when a board owner removed my copyright. I had no intention of even leaving the comment in the mod (and certainly would never carry out)

nitra1000
05-26-2011, 07:55 AM
Does this track just the home page or every page ?

I used the code before and placed in in my header template

Every page.

betts02
05-26-2011, 07:57 AM
Sorry removed this due to above post by Admin

Kraxell
05-26-2011, 08:14 AM
Does it work with vB 4.1.2?

nitra1000
05-26-2011, 08:21 AM
Does it work with vB 4.1.2?

Should work on all 4.x

BadgerDog
05-26-2011, 10:27 AM
I'm confused ... :confused:

I've had Google Analytics installed for a couple of years and recently updated their script directly with their add-on code to be asynchronous.

Are you saying that this mod adds this new "speed" capability to their code and I need to install your mod as well to get this capability, or is it something I should see under my regular Google Analytics web page analysis?

Thanks .. :)

Regards,
Doug

nitra1000
05-26-2011, 10:58 AM
This mod

* add the asynchronous code in the header
* adds the code to enable speed tracking
* adds the code to let you know if they are guests or members

Basic it does everything.... you just put in your ha code

BadgerDog
05-26-2011, 11:06 AM
This mod

* add the asynchronous code in the header
* adds the code to enable speed tracking
* adds the code to let you know if they are guests or members

Basic it does everything.... you just put in your ha code

Understood ... thanks .. :)

Since I'm already running the Google Code, I just added their additional variables to it.... :up:

Regards,
Doug

trophyrider
05-26-2011, 09:43 PM
How do i get these reports to show up in Google Analytics?

nitra1000
05-27-2011, 12:26 AM
How do i get these reports to show up in Google Analytics?

Will be writing a detailed how to tomorrow....

Basicly site speed is click new version in top right - go to content - Site Speed

User Information is available in content custom variables but for it to be of use you need to create custom segments (to product segmented graphs)

Acido
06-03-2011, 09:36 PM
cant see nothing in analytics panel. I´ll be waiting for your how to to try again the product.

glen290
06-03-2011, 10:07 PM
Installed, will be interesting to see how it shows in google analytics,,

CRDeveloper
06-04-2011, 04:56 AM
Installed in two forums, now testing!

nitra1000
06-07-2011, 07:47 PM
You can now find instructions in the links provided :)

Alfa1
06-09-2011, 10:48 PM
This should be in stock vb. Thanks.

MonkYZ
06-13-2011, 09:39 PM
Unfortunatelly for me... it doesn't enable Site Speed in Analytics... It's still showing 0.00... What else can i check/do ?

TheLastSuperman
06-13-2011, 09:54 PM
Unfortunatelly for me... it doesn't enable Site Speed in Analytics... It's still showing 0.00... What else can i check/do ?

If you just enabled that option it could take up to 48 hours for the new info to be tracked and shown, please refer to this post: https://vborg.vbsupport.ru/showpost.php?p=2204935&postcount=27

If you find out otherwise please report back so we can see if this is another issue your having ;).

nitra1000
06-13-2011, 10:25 PM
Thanks @last, @monk if theres nothing in 48 hours please reply back here with url, and also a aprox traffic figure would help (site speed is taken from a rough sample of visitors)

MonkYZ
06-13-2011, 10:55 PM
Thanks guys! I thought 24h or so will be more than enough. I'll leave it for at least 48h and report back!

RC-Central
06-29-2011, 03:48 AM
Dl'ed and Installed! Now I would like to add the results in a block on main page if possible?? Please help!

K!nG
06-29-2011, 05:45 AM
I just added tracking code like an hour ago in my header template as well because before i couldn't find this mod. lol now my question is if i install this one do i have to remove those codes from header template or i can leave them there as well ??

LVC
08-08-2011, 01:29 AM
where can I find info on the various options/settings

Use Script to Show
Tracking
Guest vs User
Speed

what is the default settings

Also if I select guest vs user -- does google still record total numbers for the site?

LVC
08-14-2011, 12:52 PM
How do you set up a custom report for Users vs Guests in google using this mod?

I want to track visits & Pageviews or Members vs guest?

I tried to do it -- but the numbers do not even come close to adding up

KProjects
08-14-2011, 02:54 PM
Great mod.. thanks!

nitra1000
08-14-2011, 09:09 PM
LVC, I've sent you a pm hope it helps.

matt94gt
08-30-2011, 12:43 AM
Hey, I applied this mod. Went to Options > Google Analytics Script then pretty well turned everything ON and eneterd my UA Number. Is that all?

Is there somewhere on vBull where I can see the stats without going onto analytics, or does this simply just enter the UA code automatically so that my analytics can track everything?

gabrielt
08-30-2011, 02:10 AM
This mod has a flaw, as your forgot something. You didn't add the tracking code on the ARCHIVE section of vbulletin, which is available by default at http://www.url.com/forum/archive/index.php.

Here is how to add this, I hope this helps on adding this feature on a future release.

Create a new plugin at hook archive_complete.

Add the following code:

$code="<script type=\"text/javascript\">

var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-11076357-1']);
_gaq.push(['_trackPageview']);

(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();

</script></head>";
$output=str_replace("</head>",$code,$output);

I hope this helps.

1320Nation
09-04-2011, 06:40 AM
This mod has a flaw, as your forgot something. You didn't add the tracking code on the ARCHIVE section of vbulletin, which is available by default at http://www.url.com/forum/archive/index.php.

Here is how to add this, I hope this helps on adding this feature on a future release.

Create a new plugin at hook archive_complete.

Add the following code:

$code="<script type=\"text/javascript\">

var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-11076357-1']);
_gaq.push(['_trackPageview']);

(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();

</script></head>";
$output=str_replace("</head>",$code,$output);

I hope this helps.

Why would we update our code with your UA # in it? ('UA-11076357-1')

Ginger Ninja
09-11-2011, 07:43 AM
I have had a skin installed and now I'm showing no data in analytics. Could the skin have deleted the header info?

nitra1000
09-18-2011, 02:52 PM
I have had a skin installed and now I'm showing no data in analytics. Could the skin have deleted the header info?

Check your source for mention of your UA number

afridicommunity
09-29-2011, 02:55 PM
Nice mod i have installed it and its working gr8

Light Peak
09-29-2011, 04:19 PM
does this support SSL Google Analytics?

as i don't want my users to be thrown "Connection Partially Encrypted" error on my full-SSL enabled site.

nitra1000
10-09-2011, 08:23 PM
does this support SSL Google Analytics?

as i don't want my users to be thrown "Connection Partially Encrypted" error on my full-SSL enabled site.

Do you still want this? It shouldn't be to difficult (let me know via pm)

Manoel J?nior
10-19-2011, 12:17 PM
How to see statistics?

smimosmile
10-22-2011, 06:11 PM
Thanks, installed.

ssoc
10-24-2011, 06:50 PM
Installed, then noticed the junk link it was adding to the footer of my site for non-logged-in members, as per attached image (bottom line).

134047

Uninstalled.

nitra1000
10-26-2011, 08:47 PM
How to see statistics?

Check the links given, if you try and have problems I can help you out.

Scyther
12-11-2011, 10:54 AM
I am trying this...marked installed...

nbhoodrat
12-15-2011, 08:11 PM
15.00 Donation - your #$%#$$# CAZY!

How long did you spend making this a half an hour? I'm sure you should be compensated untold hundreds for your work. <-- sarcasm

ssoc
03-05-2012, 04:18 PM
As per this thread: https://www.vbulletin.com/forum/showthread.php/392571-is-this-a-vB-copyright-text?

...uninstalled.

I'm all for supporting developers by way of donation, but this is a dirty tactic.

nitra1000
04-05-2012, 01:08 PM
15.00 Donation - your #$%#$$# CAZY!

How long did you spend making this a half an hour? I'm sure you should be compensated untold hundreds for your work. <-- sarcasm

So how many hours have you put in to developing modifications?

P.S @SSOC I agree a dirty tactic by a past self, I will remove the code and make it clearer

dadoc
04-06-2012, 03:41 AM
Is this similar to the vbseo function
that adds the code to all pages?

Or does it add extra functions to Anylitics results?

troyuncucom
04-06-2012, 08:50 AM
works 3.8.x?