• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Track Usergroups in Google Analytics

AzzidReign

Well-known member
#21
Hi @DBA I'm coming back to this now. Why is there a "1" after the </xen:if>?

And why do we need it to look like:
'Registered-2',

And now just "Registered"?
 
Last edited:

DBA

Well-known member
#27
DBA updated Track Usergroups in Google Analytics with a new update entry:

Updated to work with Google Universal Analytics

Finally updated it to work with Universal.

In Google Analytics go to the Admin tab and select Custom Definitions under your Property. Add your new Custom Dimension's, I only did a Logged-In and Guest.

View attachment 139661

Add the new code to the google_analytics template on your website like this (be sure that your dimension numbers match with the code on Google Analytics):
PHP:
    ga('create', '{$xenOptions.googleAnalyticsWebPropertyId}', 'auto');
<xen:if is="{$visitor.user_id}">...
Read the rest of this update entry...
 
#28
@DBA how long after I change the Google_Analytics template, add the code, and the custom Dimensions in GA will it start to track the different user Groups? Hours, days, weeks?
 

DBA

Well-known member
#29
@DBA how long after I change the Google_Analytics template, add the code, and the custom Dimensions in GA will it start to track the different user Groups? Hours, days, weeks?
It should start tracking right away however I think it took a few hours before it showed up in the same day report.