I would like to colect user access statistics and Piwik (http://piwik.org) seems to do it well.
Howevwer - I have a Q on what would be the best approach/setup for tracking individual space stats.
should I go with
I am loooking for a combination of a performance/ease of use/flexibility features.
thanks in advance
related questions:
Adding custom JavaScript to each space individually sounds like madness. Use the same "blob" throughout (yes, put it in the Custom HTML section), but use some kind of custom variables to differentiate the individual spaces.
This means that you can view analytics site-wide, but also just for individual spaces.
Here's how we do things for the Webtrends and Google Analytics plugins:
if (typeof AJS.params.spaceKey == 'string'){ // Webtrends dcsMultiTrack('DCSext.w_space_key', AJS.params.spaceKey); // Google Analytics _gaq.push(['_setCustomVar', 1, // This custom var is set to slot #1 of 5 'confluence-space-key', // The name acts as a kind of category for the activity AJS.params.spaceKey, // This value of the custom variable 3 // Sets the scope to page-level ]); }
Once this is set up, you'd need to construct a custom report to filter on the w_space_key custom dimension (Webtrends) or confluence-space-key custom variable (Google Analytics)
Looking at the Piwik wiki it seems that the JavaScript is almost directly lifted from the pre-async Google Analytics days:
piwikTracker.setCustomVariable(1, 'confluence-space-key', AJS.params.spaceKey, 'page');
You just need to build the custom reports :)
-- Hope this helps, David
P.S. I'm also curious why you want to use Piwik over Google Analytics.
P.P.S. If you need further help, AppFusions have expertise in integrating Confluence with solutions from various web analytics vendors.
we run CONF in an enterprise environment and dealing with IT Security department questioning "why do we send data to GOOG" would be too risky, i guess :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@webwesen: How did this go? Was it helpful? If so, give it an up-vote/mark as correct ;-)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You wouldn't happen to have screenshots on what that filter would look like in Google Analytics would you? I'm having trouble creating the Custom Report.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I had a similar need to track Confluence with Piwik, including custom variables. We inserted the following code into Confluence's head (see Confluence how to article):
<!-- Piwik --> <script type="text/javascript"> //https://confluence.atlassian.com/display/CONFKB/How+to+Use+JavaScript+in+Confluence var _paq = _paq || []; AJS.toInit(function(){ var u = (("https:" == document.location.protocol) ? "https://<<INSERT YOUR PIWIK URL HERE>>" : "http://<<AND HERE>>"); _paq.push(['setSiteId', <<INSERT YOUR ID HERE>>>]); _paq.push(['setTrackerUrl', u+'piwik.php']); _paq.push(['setCustomVariable', 1, "Space", AJS.params.spaceKey, "visit"]); _paq.push(['setCustomVariable', 2, "NTid", AJS.params.remoteUser, "visit"]); _paq.push(['setCustomVariable', 3, "User", AJS.params.currentUserFullname, "visit"]); _paq.push(['enableLinkTracking']); _paq.push(['trackPageView']); var d = document, g = d.createElement('script'), s = d.getElementsByTagName('script')[0]; g.type = 'text/javascript'; g.defer = true; g.async = true; g.src = u + 'piwik.js'; s.parentNode.insertBefore(g,s); })(); </script> <!-- End Piwik Code || Edited 1/9/2015, working with version 5.3.4 of confluence-->
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I added bellow code in my javascript function but unique visitors count of custom variables is showing blank in piwik. ![piwik1](https://cloud.githubusercontent.com/assets/5286315/11184714/24f1520c-8c9f-11e5-8468-2c73928c6ebd.PNG) var u=(("https:" == document.location.protocol) ? "https" : "http") + "://"+paq_url+"/"; _paq.push(['setTrackerUrl', u+'piwik.php']); _paq.push(['setSiteId', paq_site_id]); _paq.push(['setUserId', userId]); _paq.push(['setCustomVariable', '3','Full Text Search User Types',userType,'visit']); _paq.push(['trackPageView']); _paq.push(['trackSiteSearch',keyword,category,searchCount]); I am using piwik 2.15.0 , Please help me
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.