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

Better integration with Google Analytics

Discussion in 'XenForo Suggestions' started by imthebest, Jan 15, 2014.

  1. imthebest

    imthebest Formerly Super120

    semprot, rass, eberkund and 9 others like this.
  2. dknife

    dknife Active Member

    Wouldn't this be fairly easy to achieve in Analytics? A custom report, table of top content, regex for drilldown to subforums only?
  3. ForestForTrees

    ForestForTrees Well-Known Member

    Not necessarily. Suppose, for example, someone viewed this thread. Clearly Google Analytics has a great deal of data at it's disposal, but it doesn't typically know that thread 66700 (i.e. this thread) is associated with node 18, the "XenForo Suggestions" subforum. Looking at a typical URL for this thread, for example, note that it does not mention either node 18 or "XenForo Suggestions:"

    As @digitalpoint suggested, the way to give it that information would be to use a Google Analytics Custom Variable. By adding a line of JavaScript when the GA tracking code is called from the google_analytics template, it will be easier to make reports and Advanced Segments in GA.
    imthebest and dknife like this.
  4. dknife

    dknife Active Member

    Ah yes I see what you mean, you are correct, there is no correlation with the nodes for the threads in the URL. I guess visitors flow wouldn't be very comprehensive either since direct to thread via search engines won't be relevant. Thanks for the info.
    imthebest and ForestForTrees like this.
  5. Jeffin

    Jeffin Well-Known Member

    +1 from me for better integration Google Analytics, Google Webmasters and Google Adsense. I wouldn't mind if it were an add-on but an official one I would definitely pay for.
  6. digitalpoint

    digitalpoint Well-Known Member

    So I added username and node_id tracking as custom variables for my "Better Analytics" add-on (just testing it now on my site... not available for others yet).

    For example, you can see the node IDs by visits here (I have it intentionally using the numeric value vs. the string/name since the forum name could change over time if you change the wording or something):


    And then you can also see it broken down by username:


    You can combine the two to see where specific users tend to hang out if you want (you can also break it down by anything really...


    It lets you combine the data with anything Analytics tracks really... Like if you have the demographic/interests stuff enabled for Analytics you can break down the age range of people using certain forums (as an example):

    semprot, Fred., rass and 6 others like this.
  7. DRE

    DRE Well-Known Member

  8. digitalpoint

    digitalpoint Well-Known Member

    The problem with usergroup tracking would be that each user can be part of an infinite number of user groups. Not really sure what would happen if you tried to apply multiple values to a single item for each tracking request. It would be similar if you were trying to tell it the user is using as their IP address *and* as their IP address *and* as their IP address... or that the user is using Chrome as their browser *and* Firefox as their browser on that same page view.

    You could of course do it with just the primary usergroup since you can only have 1, but not sure how useful that really would be.
  9. DRE

    DRE Well-Known Member

  10. digitalpoint

    digitalpoint Well-Known Member

  11. seojoseph

    seojoseph Member

    So thats all you did? Set the username and node_id tracking as custom variables and push those to analytics then created the custom google analytics report? Hmm, I can't seem to dig out your analytics snippet. Seems easy enough.
  12. digitalpoint

    digitalpoint Well-Known Member

    That's the short version, yeah.
    Dinh Thanh likes this.
  13. Dinh Thanh

    Dinh Thanh Well-Known Member

    Nice Analytics.
    Great to see you release the update!
  14. digitalpoint

    digitalpoint Well-Known Member

    Give it a few days... already made some changes because I decided I hated seeing node ID in the analytics reports. Just switched it to be this format: "Some Forum Name (xxx)" (xxx being the node_id). We'll see how it looks tomorrow...
    Dinh Thanh likes this.
  15. Dinh Thanh

    Dinh Thanh Well-Known Member

    That's so good!
  16. digitalpoint

    digitalpoint Well-Known Member

    It's actually pretty amazing how fast you start seeing data. I have a tool to generate percentage area charts via your Google Analytics account (via API), and it's already starting to register the change for a couple of the more popular areas).

    Literally it's been changed for about 5 minutes, and you can see the change for a few sections already...

    BTW - it's a terribly useful tool if anyone wants to play with it with their own data: https://tools.digitalpoint.com/analytics-charts

  17. Dakis

    Dakis Well-Known Member

    That looks great!! I assume the node id includes only the forum views right? Not the threads of each node as well?
  18. digitalpoint

    digitalpoint Well-Known Member

    No, it's complete usage of the forum (thread listings AND individual threads).

    Not a ton of data on this (only about 45 minutes worth), but it's nice to see what forum areas are the most popular (now that it's easier to read than just the node ID)...

  19. Dakis

    Dakis Well-Known Member

    That is absolutely incredible then. I have a huge need to be able to tell which forums of my site get most visits, etc.

    I am eagerly awaiting for this to be released. Thousand thanks!
  20. digitalpoint

    digitalpoint Well-Known Member

    Oh yeah, forgot to show how you can tell the difference between guests vs. members when you are tracking individual usernames (data isn't a whole day)...

    6.92% of visitors *had* a username... meaning 93.08% were guests.


Share This Page