Hi,
I did already ask this in the german subforum, but didn't get any answer (yet).
How can I extend the Google Analytics tracking code which is implemented by vbSEO?
Greetings
Valentin
This is a discussion on extend Google Analytics Code within the Analysis: Traffic & SERPS forums, part of the vBulletin SEO Discussion category; Hi, I did already ask this in the german subforum, but didn't get any answer (yet). How can I extend ...
Hi,
I did already ask this in the german subforum, but didn't get any answer (yet).
How can I extend the Google Analytics tracking code which is implemented by vbSEO?
Greetings
Valentin
What exactly are you looking to do?
Brian Cummiskey / Crawlability Inc.
vBSEO 3.6.0 GOLD Released!
Unveiling the NEW vBSEO Sitemap Generator 3.0. - available NOW for vBSEO Customers!
I would like to add some custom variables: Custom Variables - Google Analytics - Google Code
You options are to
a) edit includes/functions_vbseo.php to include the code (makes upgrading a pain)
b) create a new plugin with an execution order LOWER than vbseo and likely the global_complete hook if its a global change, else you'll need to make a plugin for each xxxx_compelte hook (so it goes before it) and put the info you need into $more_tracking2 variable, as in
Code:$more_tracking2 .= "\n".'pageTracker._trackPageview();';
Brian Cummiskey / Crawlability Inc.
vBSEO 3.6.0 GOLD Released!
Unveiling the NEW vBSEO Sitemap Generator 3.0. - available NOW for vBSEO Customers!
Hi,
The file includes/functions_vbseo.php is not included in the 3.5 version. Were do I find the Google Analytics script in this version? I need to add this code to it:
Code:pageTracker._setDomainName(".ourdomain.com");
Hi Jon,
All off the files have been moved into their own folder try
vbseo/includes/functions_vbseo.php
Ceri
I found the file, thank you.
But I can't find were to add my string to the actual Google Analytics script. I'm not sure this shall be done it that file. Where can I add my extended code!?
see post #4 above.
.= on the variable 'continuies' the variable. You're adding a line break (\n), and then your tracker code
Brian Cummiskey / Crawlability Inc.
vBSEO 3.6.0 GOLD Released!
Unveiling the NEW vBSEO Sitemap Generator 3.0. - available NOW for vBSEO Customers!
Ok, so our additional tracking code should look like this?:
$more_tracking2 .= "\n".'pageTracker._setDomainName(".ourdomain.com") ;';
We're using version 3.5. Could you please tell me exactly where in /vbseo/includes/functions_vbseo.php I shall place this code?
3.5 uses the new ajax style analytics and is slightly different call method
around line 2169 find
add above: (UNTESTED)Code:vbseo_insert_code(" <script type=\"text/javascript\"><!-- var _gaq = _gaq || []; _gaq.push( " . implode(",\n", $more_tracking) ." );
Code://add on domain extra code $more_tracking[] = "['_setDomainName', 'foo.com']";
Brian Cummiskey / Crawlability Inc.
vBSEO 3.6.0 GOLD Released!
Unveiling the NEW vBSEO Sitemap Generator 3.0. - available NOW for vBSEO Customers!
Hello,
I think it could be a great feature for new releases to be able of changing the default analytics tracking code from de vbSEO panel.
Hi Brian how would this play out if I also want to use 3.5 and asynchronous tracking Asynchronous Tracking - Google Analytics - Google Code ? would final 3.5 version support both features out of the box for subdomain tracking + asynchronous tracking ?
for subdomains Asynchronous Tracking Usage Guide - Google Analytics - Google Code
3.5 already uses the async tracking method.
virtual domain support is coming with 3.5 gold.
Brian Cummiskey / Crawlability Inc.
vBSEO 3.6.0 GOLD Released!
Unveiling the NEW vBSEO Sitemap Generator 3.0. - available NOW for vBSEO Customers!
thanks Brian![]()
Tracking API: Basic Configuration - Google Analytics - Google Code
_setVar is depreciated. Please use
_setCustomVar instead in functions_vbseo.php
Furthermore provide an interface in the control panel to let the admin decide how to name that variable. Otherwise it might collide with other values that the admin has set for non-forum pages.