Page MenuHomePhabricator

Rewrite/refactor custom Piwik plugin
Closed, ResolvedPublic3 Estimated Story Points

Description

We use a custom Piwik plugin, that takes care of archiving daily campaign referrer visits on a quarter-hour basis.

The plugin is working with Piwik 2. We need to investigate if it is still working with Piwik 3 (and if not apply the necessary changes to it).

Acceptance criteria:

  • The plugin archives data produced by visits including piwik_campaign and piwik_kwd in the query string is being archived during the general archiving cron job.
  • The plugin adds a sub-entry to the Referrers menu
  • The plugin provides an API ("CampaignVisitorsByTime." method) consumable by the "Fundraising Operation Center"
  • Create tests, especially for the Archiver class
  • Create CI (PHPCS, PHPMD, maybe more stuff, see FundraisingFrontend repository for reference) for CampaignVisitorsByTime repository

Background:

Event Timeline

Ticket handled as part of T187313 and might not be needed anymore?

• Tim_WMDE updated the task description. (Show Details)
• Tim_WMDE set the point value for this task to 3.

Here is the pull request:

https://github.com/wmde/CampaignVisitorsByTime/pull/2

I am not entirely happy with the result since the limitations of the Matomo core held back quite a few refactoring possibilities and limited unit testing greatly, mainly due to the fact that they use PHP's require and singletons in a ton of places. Either way, the code is now cleaner and I have set up Travis to enforce our coding standards. Feel free to implement or suggest more changes, though!

gabriel-wmde subscribed.

As we have no test system, I did a "git pull" on production.