Page MenuHomePhabricator

Embed web analytics script in pages on wikipedia.de
Closed, ResolvedPublic2 Estimated Story Points

Description

Now that we have a newly setup web analytics instance, we need to embed a script into the code on wikipedia.de. The following pages should contain the code:

  • index.php
  • imprint.html
  • about.html

Snippet:

<!-- Matomo -->
<script type="text/javascript">
  var _paq = _paq || [];
  /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
  _paq.push(['trackPageView']);
  _paq.push(['enableLinkTracking']);
  (function() {
    var u="//stats.wikimedia.de/";
    _paq.push(['setTrackerUrl', u+'piwik.php']);
    _paq.push(['setSiteId', '3']);
    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="//stats.wikimedia.de/piwik.php?idsite=3&amp;rec=1" style="border:0;" alt="" /></p></noscript>
<!-- End Matomo Code -->

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
kai.nissen set the point value for this task to 2.Jul 16 2018, 9:42 AM

@Tonina_Zhelyazkova_WMDE @gabriel-wmde Hi, i just checked data in Matomo and it seems like the data is not tracked correctly. Daily Unique Page Views ("Eindeutige Besucher") are with values of ~300 much lower than the unique page views measured before by the Matomo of spenden.wikimedia.de (~800-1200). (I guess in both cases only 1% of the page views is being tracked, correct?) Can you please have a look soon?

The issue is problematic because the tracking via the Matomo of spenden.wikimedia.de was supposedly deactivated at the same time when the tracking via the wikimedia-Matomo was implemented. So if the tracking on the latter is not correct, we do not have any data at the moment.

To prevent such situation the tracking via spenden.wikimedia-Matomo was a redundant tracking for safety reasons. Now this redundancy doesn't exist anymore. Is there a specific reason for deactivating the tracking via spenden.wikimedia-Matomo?