1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Analytics per usergroup

Discussion in 'Better Analytics' started by Crazy-Achmet, Nov 2, 2015.

  1. #1
    Hey,

    maybe that's already possible and i just don't know how.

    Is there a way i can compare guests, registered users, premium users (usergroup) and moderators?

    I really would like to see the difference between all those users on my site.

    Thanks in advance

    Flo
     
    Solved! View solution.
    Crazy-Achmet, Nov 2, 2015 IP
  2. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,333
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #2
    No, the system does not log specific usergroups (mainly because Google Analytics does not allow you to set multiple values on a per user/page view basis). And since a user can have more than one usergroup, that's the issue.
     
    digitalpoint, Nov 2, 2015 IP
  3. Crazy-Achmet

    Crazy-Achmet Active Member

    Messages:
    5
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    51
    #3
    Thanks for your answer! :)

    Since i don't have multiple usergroups, could you explain it to me how i could add that manually (by template changes)? That would be really helpful! :)
     
    Crazy-Achmet, Nov 2, 2015 IP
  4. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,333
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #4
    Not sure off the top of my head since I've never tried to do it (like I said, since XenForo can have multiple usergroups per user it was always an issue). But if you wanted to do it and just ignore secondary usergroups or something, I suppose you could do that. If you aren't familiar with XenForo development, you can probably find someone a consultant who could do it for you on xenforo.com (I think they have an area just for that).
     
    digitalpoint, Nov 2, 2015 IP
  5. Crazy-Achmet

    Crazy-Achmet Active Member

    Messages:
    5
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    51
    #5
    Hey Shawn,

    i know i can do it with this code (in the original XenForo analytics code)

      _gaq.push(['_setCustomVar',
          1,
          'Usergroup',
    <xen:if is="{xen:helper ismemberof, $visitor, 1}">
          'Unregistered-1',
    <xen:elseif is="{xen:helper ismemberof, $visitor, 2}" />
          'Registered-2',
    <xen:elseif is="{xen:helper ismemberof, $visitor, 3}" />
          'Administrator-3',
    <xen:elseif is="{xen:helper ismemberof, $visitor, 4}" />
          'Moderator-4',
    </xen:if>
          1
    ]);
    Code (markup):
    But since your analytics code looks so much different, i'm not sure how to edit that! :D
     
    Crazy-Achmet, Nov 3, 2015 IP
  6. #6
    digitalpoint, Nov 3, 2015 IP