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
vBulletin 4, the most powerful community software + vBSEO 3.5, the ultimate SEO solution = Your ultimate platform for 2010 and beyond. Click below to learn more.
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.
Sneek Preview Video of the new Control Panel
vBSEO 3.5 RC2 (Final)- Released for your Evaluation
Check us out on FaceBook!
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.
Sneek Preview Video of the new Control Panel
vBSEO 3.5 RC2 (Final)- Released for your Evaluation
Check us out on FaceBook!
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
Ceri May / Crawlability Inc.
Sneek Preview Video of the new Control Panel
vBSEO 3.5 RC2 (Final)- Released for your Evaluation
Check us out on FaceBook!
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.
Sneek Preview Video of the new Control Panel
vBSEO 3.5 RC2 (Final)- Released for your Evaluation
Check us out on FaceBook!
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.
Sneek Preview Video of the new Control Panel
vBSEO 3.5 RC2 (Final)- Released for your Evaluation
Check us out on FaceBook!
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.