New Piwik Tracking API: Track visits from Mobile apps, Desktop apps… anywhere
Recently, we released a powerful set of new APIs to track visitors, page views and goal conversions: Piwik Tracking APIs
- Simple Image Tracker
- Piwik Tracking API
You can call the Piwik Tracking API using your favorite programming language, over HTTP.
Piwik comes with the PHP Client ready to use, providing a very easy way to track visits, page views, goal conversions, and also set Visitor details (user agent, language, URL, Referer URL, etc.).
Clients for Perl, Python, Java or Ruby will hopefully be contributed by Piwik users in the future. Please let us know if you are interested to contribute your client.
- Advanced Image Tracker
The PHP Client can send direct requests to the Piwik API, but it can also generate an advanced image tag. The advanced image tag requires to be loaded in an HTML context.
Tracking API documentation
Learn more about tracking data using the new APIs in the official documentation: Piwik Tracking API documentation.
How Piwik used the new API to improve code quality and stability
We have made great progress recently regarding our Quality Assurance effort.
Using the new Tracking APIs, we added automated tests that
- create website and goals
- generate controlled hits to the Tracker
- tracking pages
- some of which have excluded URL parameters
- tracking clicks and downloads
- tracking Goals
- matching URLs
- for several days
- for several websites
- with custom referers (direct entry, websites, search, campaigns)
- with custom browsers and OS
- tracking pages
- generate hits with invalid states
- excluded IPs
- invalid websites
- simulate search bot visits
- Using the Metadata API, we get the list of all Analytics Reports API functions available in Piwik.
We then call each function over http, and record the output XML containing the API output.
- We check that the returned XML is the same as the expected XML.
Using these set of tests, we are now able to detect very easily any regression introduced in the Tracking, Archiving or API code.
Tests now run continuously on Jenkins, our build server. Learn more about our QA process and efforts
Please let us know what you think in the comments.