Page MenuHomePhorge

Use Piwik API
Open, NormalPublic


CreateWiki/DeleteWiki currently uses database calls to insert new sites into Piwik (our analytics software). This should be converted to API calls as intended by Piwik.

Event Timeline

It's worth noting that we've altered Piwik's DB schema slightly (see /extensions/CreateWiki/CreateWiki_backend.php, function addToAnalytics). That being said, I recall we've discussed about this some years ago but I don't remember what was the precise rationale for this, besides the "this is how Piwik devs want you to use their thing from an external application". What benefits does this provide over our current setup of directly doing an INSERT?

The Piwik setup is in another country, with a different hosting provider, on a different network which makes it a lot slower to call - it used to be on rar which had private network access. Additionally, when MySQL throws an error (like connection), it takes a long time and has the entire CreateWiki request time out normally (unless something has been done to fix that), which results in broken wikis.

Now I think about it, the downside of using the API would be that we can't manually insert the ID via the API, which can be important to insert all the missed/broken wikis that could occur.

Upside, someone learns how to use the Piwik API which is definitely needed for some other projects that I have in mind.

lewiscawte triaged this task as Normal priority.Jul 11 2016, 9:00 AM