vBulletin SEO Forums

SEO

vBulletin Search Engine Optimization

Buy vBSEO Now! HACKER SAFE certified sites prevent over 99.9% of hacker crime.
ne nw
vBSEO Total Support Team Launches DeskPro New vBSEO Discount Level for Network Builders vBSEO 3.2.0 GOLD Has Landed Success with vBSEO = 600ore Web Visitors + $1400 in a Day! Crawlability Inc. Files for SEO Technology Patent
se sw

Analytics Segmentation Tracking

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 ...

Go Back   vBulletin SEO Forums > vBulletin SEO Discussion > Analysis: Traffic & SERPS

Enhancing 80 million pages.

Register FAQ Members List Social Groups Calendar Search Today's Posts Mark Forums Read

Reply

 

LinkBack Thread Tools
  #1  
Old 03-20-2008, 11:55 PM
Oleg Ignatiuk's Avatar
vBSEO Staff
vBSEO Total Customer SupportvBSEO Documenter
 
Real Name: Oleg Ignatiuk
Join Date: Jun 2005
Location: Belarus
Posts: 21,594
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:
if(THIS_SCRIPT == 'register'
and add above:
PHP Code:
        if(THIS_SCRIPT == 'login' && $GLOBALS['bbuserinfo']['userid'])
        {
            
$newtext preg_replace('#(</body>)#is','
<script type="text/javascript">
pageTracker._setVar("member");
</script>
'
.'\\1',$newtext,1);
        } 

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:
        if($GLOBALS['bbuserinfo']['userid'])
        {
            
$newtext preg_replace('#(</body>)#is','
<script type="text/javascript">
pageTracker._setVar("member");
</script>
'
.'\\1',$newtext,1);
        } 

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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on Facebook!
Reply With Quote
  #2  
Old 03-21-2008, 03:59 AM
briansol's Avatar
Senior Member
vBSEO Pre-Release TeamDesign for SEOBig Board Administrator
 
Real Name: Brian
Join Date: Apr 2006
Location: Central CT, USA
Posts: 5,538
Note: This is for the OLD Urchin style Analytics.

If you upgraded to the new version,
you need to use

pageTracker._setVar('member');
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on Facebook!
Reply With Quote
  #3  
Old 03-21-2008, 05:11 AM
Oleg Ignatiuk's Avatar
vBSEO Staff
vBSEO Total Customer SupportvBSEO Documenter
 
Real Name: Oleg Ignatiuk
Join Date: Jun 2005
Location: Belarus
Posts: 21,594
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.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on Facebook!
Reply With Quote
  #4  
Old 03-21-2008, 01:16 PM
Senior Member
Big Board Administrator
 
Real Name: John
Join Date: Dec 2005
Posts: 386
Hum, so using the above you could actually define separate segments. Users that logged in and users that are already logged in.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on Facebook!
Reply With Quote
  #5  
Old 03-21-2008, 01:37 PM
Oleg Ignatiuk's Avatar
vBSEO Staff
vBSEO Total Customer SupportvBSEO Documenter
 
Real Name: Oleg Ignatiuk
Join Date: Jun 2005
Location: Belarus
Posts: 21,594
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.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on Facebook!
Reply With Quote
  #6  
Old 03-22-2008, 02:58 AM
briansol's Avatar
Senior Member
vBSEO Pre-Release TeamDesign for SEOBig Board Administrator
 
Real Name: Brian
Join Date: Apr 2006
Location: Central CT, USA
Posts: 5,538
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>
and on the registration (assumed logged out):

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>
Attached Files
File Type: txt anlytics_update.txt (1.4 KB, 68 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on Facebook!
Reply With Quote
  #7  
Old 03-22-2008, 03:16 AM
briansol's Avatar
Senior Member
vBSEO Pre-Release TeamDesign for SEOBig Board Administrator
 
Real Name: Brian
Join Date: Apr 2006
Location: Central CT, USA
Posts: 5,538
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 . '\');';
replace with

Code:
$linkout = 'pageTracker._trackPageview(\'' . VBSEO_ANALYTICS_EXT_FORMAT . $linkout . '\');';
and also on
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);
That should get you 100% up to speed on the latest trackers
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on Facebook!
Reply With Quote
  #8  
Old 03-22-2008, 12:49 PM
Oleg Ignatiuk's Avatar
vBSEO Staff
vBSEO Total Customer SupportvBSEO Documenter
 
Real Name: Oleg Ignatiuk
Join Date: Jun 2005
Location: Belarus
Posts: 21,594
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.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on Facebook!
Reply With Quote
  #9  
Old 04-11-2008, 09:58 PM
Junior Member
 
Join Date: Oct 2005
Posts: 24
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on Facebook!
Reply With Quote
  #10  
Old 04-12-2008, 04:50 AM
Oleg Ignatiuk's Avatar
vBSEO Staff
vBSEO Total Customer SupportvBSEO Documenter
 
Real Name: Oleg Ignatiuk
Join Date: Jun 2005
Location: Belarus
Posts: 21,594
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.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on Facebook!
Reply With Quote
  #11  
Old 04-14-2008, 03:17 PM
Senior Member
Big Board Administrator
 
Real Name: John
Join Date: Dec 2005
Posts: 386
Quote:
Originally Posted by Oleg Ignatiuk View Post
Yes, that will be included in the next vBSEO version.
Sweet!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on Facebook!
Reply With Quote
  #12  
Old 04-14-2008, 05:01 PM
briansol's Avatar
Senior Member
vBSEO Pre-Release TeamDesign for SEOBig Board Administrator
 
Real Name: Brian
Join Date: Apr 2006
Location: Central CT, USA
Posts: 5,538
Just to update....

DO NOT use the 'guest' tracker. Doing this will forfeit all your bounce rate stats.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on Facebook!
Reply With Quote
  #13  
Old 04-26-2008, 01:05 PM
Oleg Ignatiuk's Avatar
vBSEO Staff
vBSEO Total Customer SupportvBSEO Documenter
 
Real Name: Oleg Ignatiuk
Join Date: Jun 2005
Location: Belarus
Posts: 21,594
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on Facebook!
Reply With Quote
  #14  
Old 05-25-2008, 12:27 AM
Member
Big Board Administrator
 
Real Name: Alex B.
Join Date: Mar 2007
Location: Brooklyn, NY
Posts: 30
This should definitely be included in the next VBSEO version!!!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on Facebook!
Reply With Quote
  #15  
Old 05-25-2008, 01:18 AM
briansol's Avatar
Senior Member
vBSEO Pre-Release TeamDesign for SEOBig Board Administrator
 
Real Name: Brian
Join Date: Apr 2006
Location: Central CT, USA
Posts: 5,538
Alex, this is already in RC5 and will be for sure in gold as well
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on Facebook!
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


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


All times are GMT -4. The time now is 08:46 PM.


Powered by vBulletin Version 3.8.0 Beta 4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.5 ©2008, Crawlability, Inc.