vBulletin Search Engine Optimization
This is a discussion on Analytics Segmentation Tracking within the Analysis: Traffic & SERPS forums, part of the vBulletin SEO Discussion category; Hello, those of you who want to apply segmentation tracking in Google Analytics for your forums guests vs. members, you ...
| |||||||
Enhancing 80 million pages. | Register | FAQ | Members List | Social Groups | Calendar | Search | Today's Posts | Mark Forums Read |
|
#1
| ||||
| ||||
| Analytics Segmentation Tracking
Hello, those of you who want to apply segmentation tracking in Google Analytics for your forums guests vs. members, you can use __utmSetVar() function for that. That function sets the cookie for visitors, so it is enough to put this on the login page only, find this in functions_vbseo.php file: PHP Code: PHP Code: That will not affect users that are already logged in though (or have "remember me" enabled), so if you want to apply it for every page load for members, the code would be: PHP Code: Note: make sure that you applied updated Google Analytics code as described in New Google Analytics Code
__________________ Oleg Ignatiuk / Crawlability Inc. Support Team Launches New DeskPro Powered Tool Enhanced Support at Your Service vBSEO 3.2.0 Launched - Maximum Overdrive for Your Web Traffic! Over 100 Instant SEO Optimizations 6X Traffic - $1400 in One Day with vBSEO! Imagine What the vBSEO Patent Pending Technology Can Do For You. Last edited by Oleg Ignatiuk; 03-21-2008 at 05:10 AM. |
|
#2
| ||||
| ||||
|
Note: This is for the OLD Urchin style Analytics. If you upgraded to the new version, you need to use pageTracker._setVar('member'); |
|
#3
| ||||
| ||||
|
Thanks Brian, I've corrected the code above!
__________________ Oleg Ignatiuk / Crawlability Inc. Support Team Launches New DeskPro Powered Tool Enhanced Support at Your Service vBSEO 3.2.0 Launched - Maximum Overdrive for Your Web Traffic! Over 100 Instant SEO Optimizations 6X Traffic - $1400 in One Day with vBSEO! Imagine What the vBSEO Patent Pending Technology Can Do For You. |
|
#4
| |||
| |||
|
Hum, so using the above you could actually define separate segments. Users that logged in and users that are already logged in.
|
|
#5
| ||||
| ||||
|
It should allow to separate member visitors from guest visitors.
__________________ Oleg Ignatiuk / Crawlability Inc. Support Team Launches New DeskPro Powered Tool Enhanced Support at Your Service vBSEO 3.2.0 Launched - Maximum Overdrive for Your Web Traffic! Over 100 Instant SEO Optimizations 6X Traffic - $1400 in One Day with vBSEO! Imagine What the vBSEO Patent Pending Technology Can Do For You. |
|
#6
| ||||
| ||||
|
Oleg, I streamlined this whole process, including the registration funnel. It puts everything into one script tag nice and neat. see attached. It replaces the whole if(VBSEO_ADD_ANALYTICS_CODE) { } conditional. This produces nice code Code: <script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-xxxxxx-1");
pageTracker._initData();
pageTracker._trackPageview();
pageTracker._setVar("member");
</script>
Code: <script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("xxxxxxxx");
pageTracker._initData();
pageTracker._trackPageview();
pageTracker._setVar("guest");
pageTracker._trackPageview("/google-funnel/enter-birthday.html")</script>
|
|
#7
| ||||
| ||||
|
it should also be noted that if you are using the new GA tracker, that the 'outgoing' script needs to be addressed from urchinTracker() to the new pageTracker as well. on functions_vbseo_seo.php at about line 60 find Code: $linkout = 'urchinTracker (\'' . VBSEO_ANALYTICS_EXT_FORMAT . $linkout . '\');'; Code: $linkout = 'pageTracker._trackPageview(\'' . VBSEO_ANALYTICS_EXT_FORMAT . $linkout . '\');'; functions_vbseo.php around line 1288 find: Code: $newtext = preg_replace('#^(\s*pd\[\d+\] = )\'(.+)$#me', '"$1\'".preg_replace("#(urchinTracker \\()\'(.*?)\'#","\$1\\\'\$2\\\'", str_replace("\\\'","\'","$2"))', $newtext);
replace with: Code: $newtext = preg_replace('#^(\s*pd\[\d+\] = )\'(.+)$#me', '"$1\'".preg_replace("#(pageTracker._trackPageview \\()\'(.*?)\'#","\$1\\\'\$2\\\'", str_replace("\\\'","\'","$2"))', $newtext);
|
|
#8
| ||||
| ||||
|
Great idea on consolidating analytics code, thanks Brian!
__________________ Oleg Ignatiuk / Crawlability Inc. Support Team Launches New DeskPro Powered Tool Enhanced Support at Your Service vBSEO 3.2.0 Launched - Maximum Overdrive for Your Web Traffic! Over 100 Instant SEO Optimizations 6X Traffic - $1400 in One Day with vBSEO! Imagine What the vBSEO Patent Pending Technology Can Do For You. |
|
#9
| |||
| |||
|
Oleg, Are you going to incorporate this into a future release of vBSEO? It would be great to have an option to be able to see our Analytics by members or guests. |
|
#10
| ||||
| ||||
|
Yes, that will be included in the next vBSEO version.
__________________ Oleg Ignatiuk / Crawlability Inc. Support Team Launches New DeskPro Powered Tool Enhanced Support at Your Service vBSEO 3.2.0 Launched - Maximum Overdrive for Your Web Traffic! Over 100 Instant SEO Optimizations 6X Traffic - $1400 in One Day with vBSEO! Imagine What the vBSEO Patent Pending Technology Can Do For You. |
|
#11
| |||
| |||
| Sweet!
|
|
#12
| ||||
| ||||
|
Just to update.... DO NOT use the 'guest' tracker. Doing this will forfeit all your bounce rate stats. |
|
#13
| ||||
| ||||
|
Please try to move setVar() tracking function *above* the _trackPageview() and *below* _initData() lines, that seem to be working correctly with Bounce rate report.
__________________ Oleg Ignatiuk / Crawlability Inc. Support Team Launches New DeskPro Powered Tool Enhanced Support at Your Service vBSEO 3.2.0 Launched - Maximum Overdrive for Your Web Traffic! Over 100 Instant SEO Optimizations 6X Traffic - $1400 in One Day with vBSEO! Imagine What the vBSEO Patent Pending Technology Can Do For You. Last edited by Oleg Ignatiuk; 06-16-2008 at 06:47 AM. |
|
#14
| |||
| |||
|
This should definitely be included in the next VBSEO version!!!
|
|
#15
| ||||
| ||||
|
Alex, this is already in RC5 and will be for sure in gold as well |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Google Analytics not tracking after install | ehmax | Analysis: Traffic & SERPS | 7 | 03-31-2007 04:09 PM |
| Google Analytics: Tracking of Usernames | DBB | General Discussion | 4 | 10-04-2006 06:04 PM |
| Analytics Tracking Not Installed | lindmar | Troubleshooting | 10 | 10-04-2006 04:31 PM |