Anyone using Piwik?

Do you have had any troubles? How does it scale? We have a large web site with several million page views per day. Are you satisfied with the reports? Do you run it at a dedicated server or the same server your web site is on? Are there any serious bugs, is the software supported and updated regularly?

Did someone of you switch from Google to Piwik and was satisfied with the change?
 
I had it a long time back but I still prefer Google Analytics. Last year, their site got hacked and some malicious code was inserted into the installation files. Some sites were affected. I don't see anything good about Piwik other than the fact that it's open source. For me, I never needed an open source alternative to Google analytics so I removed it at a later time.
 
@Teapot @Deebs
@Walter
Has anyone set this up to grab the XF username with a custom variable?
Would be nice to track visits by member as well as by IP :)

Would also like to track resource downloads.
 
Last edited:
@Teapot @Deebs
@Walter
Has anyone set this up to grab the XF username with a custom variable?
Would be nice to track visits by member as well as by IP :)

Would also like to track resource downloads.

I don't use a custom variable, I use the builtin Piwik userid setting :)

Example entry:

Screen Shot 2015-01-14 at 00.37.09.webp


All you have to do is add

HTML:
<xen:if is="{$visitor.user_id}">
      _paq.push(['setUserId', '{$visitor.username}']);
  </xen:if>

underneath the first line of the piwik code:

HTML:
<!-- Piwik -->
<script type="text/javascript">
  var _paq = _paq || [];
  <xen:if is="{$visitor.user_id}">
      _paq.push(['setUserId', '{$visitor.username}']);
  </xen:if>
  _paq.push(['trackPageView']);
  _paq.push(['enableLinkTracking']);
  (function() {
    var u="//<piwik domain>/";
    _paq.push(['setTrackerUrl', u+'piwik.php']);
    _paq.push(['setSiteId', <site id>]);
    var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
    g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
  })();
</script>
<noscript><p><img src="//<piwik domain>/piwik.php?idsite=1" style="border:0;" alt="" /></p></noscript>
<!-- End Piwik Code -->
 
@Liam W I hate to dig up an old post, but since it's not closed I figure why not :)

I have Piwik and I want to be able to track userid, but have no idea where to insert the custom code. Any tips on where I'd paste the whole codeblock in? Thanks!

EDIT: Ah, in ACP > Appearance > Templates > PAGE_CONTAINER.

I'm very used to WordPress, so I was looking for a flat file. :)
 
Last edited:
@Liam W I hate to dig up an old post, but since it's not closed I figure why not :)

I have Piwik and I want to be able to track userid, but have no idea where to insert the custom code. Any tips on where I'd paste the whole codeblock in? Thanks!

EDIT: Ah, in ACP > Appearance > Templates > PAGE_CONTAINER.

I'm very used to WordPress, so I was looking for a flat file. :)

You shouldn't use the page container template. You should use the page_container_js_head template, which is included by the PAGE_CONTAINER template.

Liam
 
I'm updating this thread as this code doesn't work with XF2... here is code that will work with XF2:

Code:
  <xf:if is="$xf.visitor.user_id">
  _paq.push(['setUserId', '{$xf.visitor.username}']);
  </xf:if>
 
Top Bottom