wiki:mfpl-piwik

Version 3 (modified by Dana, 10 years ago) ( diff )

Site ID needs to be included in scripts

May First Piwik Admin

We have setup a May First Piwik to use across our sites. You can access the super admin account in keyringer to create a user account for yourself, as well as, add our websites.

Piwik Integrations

Piwik has many add-ons that can be used, they are here: http://piwik.org/integrate/

JS Tracking Code

This is a sample of JS can also be used. However the site needs to be added to Piwik and defined by the Site id # it gets when added to piwik.

<!-- Piwik -->
<script type="text/javascript">
  var _paq = _paq || [];
  _paq.push(["trackPageView"]);
  _paq.push(["enableLinkTracking"]);

  (function() {
    var u=(("https:" == document.location.protocol) ? "https" : "http") + "://analytics.mayfirst.org/";
    _paq.push(["setTrackerUrl", u+"piwik.php"]);
    _paq.push(["setSiteId", "1"]);
    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 -->

When a visitor has disabled JavaScript, or when JavaScript cannot be used, you can use an image tracking link to track visitors. Generate the link below and copy-paste the generated HTML in the page. If you're using this as a fallback for JavaScript tracking, you can surround it in <noscript></noscript> tags.

<!-- Piwik Image Tracker -->
<img src="http://analytics.mayfirst.org/piwik.php?idsite=1&amp;rec=1" style="border:0" alt="" />
<!-- End Piwik -->
Note: See TracWiki for help on using the wiki.