Page MenuHomePhabricator

Integrate Piwik with SVG Translate to keep track of metrics
Closed, ResolvedPublic2 Estimated Story Points

Description

This can't be worked on in the CommTech sprint until, and if, we get the beacon set up by the Analytics team.

User story

As a product manager, I would like to be able to keep track of some statistics about the tool so I can see what features are being used and what needs to be improved.

Requirements

Numbers that need to be captured
  • How many times the tool is launched?
  • How many times did users login using OAuth to the tool?
  • How many times did users click the Download button?
  • How many times did the users click the Upload to Commons button?
    • How many times was that operation not successful?

(Keeping numbers that Alex mentioned were capture-able using piwik)

Event Timeline

Niharika triaged this task as Medium priority.Feb 7 2019, 12:48 AM
Niharika created this task.

If for whatever reason we can't use piwik, I believe we are free to use https://awstats.sourceforge.io/ which provides is simpler, URL-based usage stats.

Samwilson subscribed.

We need Analytics to create a new beacon for us to use, and then we can add the required code to SVG Translate.

I can't see from https://wikitech.wikimedia.org/wiki/Analytics/Systems/Piwik how we're supposed to request the creation of a new beacon, so hopefully throwing this on their board isn't too rude? :-)

Not rude at all :) This is how our process works, and we groom incoming tasks Monday and Thursday. Piwiki is normally for independent websites deployed on labs (we have some exceptions). But where is this tool? How does it work?

But where is this tool? How does it work?

Also wondering... https://phabricator.wikimedia.org/project/profile/3542/ links to https://meta.wikimedia.org/wiki/Community_Tech/SVG_translation links to https://tools.wmflabs.org/svgtranslate-test/ in the status updates. Might welcome an edit to the Phab project tag description to clarify?

But where is this tool? How does it work?

Also wondering... https://phabricator.wikimedia.org/project/profile/3542/ links to https://meta.wikimedia.org/wiki/Community_Tech/SVG_translation links to https://tools.wmflabs.org/svgtranslate-test/ in the status updates. Might welcome an edit to the Phab project tag description to clarify?

Thanks @Aklapper. I updated with the link to the actual tool - https://tools.wmflabs.org/svgtranslate/

@Milimetric svgtranslate tool is on ToolForge. The tool allows one to add translations for SVG files hosted on Commons. The documentation page is here. The tool is at https://tools.wmflabs.org/svgtranslate/

This can't be worked on in the CommTech sprint until, and if, we get the beacon set up by the Analytics team.

Tracking code:

<!-- 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="//piwik.wikimedia.org/";
  _paq.push(['setTrackerUrl', u+'piwik.php']);
  _paq.push(['setSiteId', '20']);
  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>
<!-- End Matomo Code -->

Merged, and this is now live on the staging site — which is not good. Oops. I'd forgotten that we have the 'prod' flag on for the staging site (so it more closely matches the prod site).

https://github.com/wikimedia/svgtranslate/pull/83 fixes this.

PR83 is merged, and so now this is waiting to be deployed to production. QA is not possible before then (although given that it was correctly logging events from staging for a little while, it seems that it is working).

This has been included in version 0.4.0 and is now in production.

I can see couple visits, closing ticket.

Ah, sorry, user for the piwik site is same than event metrics site on piwik, let us know if you cannot login and access data.