July '10

29

Posted by

in About, Development

Comments: 6 Comments

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

If tracking visits using Javascript is not an option for you, you can use alternative ways to record visitors, visits, pages and Goal conversions in Piwik:

  1. Simple Image Tracker
    The Simple HTML Image Tracker tag can be used when Javascript is disallowed but pure HTML allowed: MySpace, Ebay for example, but also email newsletters.
    Note: the code doesn’t use Javascript so Piwik will not be able to track some user information such as search keywords, referer websites, screen resolutions, plugin support and page titles.
  2. 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.
  3. 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

  1. create website and goals
  2. generate controlled hits to the Tracker
    • tracking pages
      • some of which have excluded URL parameters
    • tracking clicks and downloads
    • tracking Goals
      • matching URLs
      • triggered using the Javascript trackGoal() function
    • for several days
    • for several websites
    • with custom referers (direct entry, websites, search, campaigns)
    • with custom browsers and OS
  3. generate hits with invalid states
    1. excluded IPs
    2. invalid websites
    3. simulate search bot visits
  4. 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.
  5. 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

Feedback

Please let us know what you think in the comments.

Happy Tracking!!

About author
piwik team member

Matthieu Aubry

While studying in India in 2006, Matthieu had the idea of creating an open source web analytics alternative to Google Analytics. In 2007 he released the first public beta version of Piwik. Matthieu now leads the project from New Zealand, where he likes to spend his days coding new features from the Piwik Roadmap, and helping users and customers use Piwik effectively. Find him on twitter or github.

Like what you read?

Subscribe to our rss feed: Posts or you can Suggest a topic to write about in the blog or See list of Features

  1. June 30, 2011 5:49 pm

    Can I simply say what a reduction to search out someone who truly knows what theyre speaking about on the internet. You undoubtedly know learn how to deliver a problem to gentle and make it important. Extra folks must learn this and perceive this facet of the story. I cant believe youre not more in style since you undoubtedly have the gift.

  2. May 26, 2011 11:08 pm

    Can I simply say what a relief to search out somebody who truly knows what theyre talking about on the internet. You undoubtedly know methods to deliver a problem to mild and make it important. More folks need to learn this and perceive this side of the story. I cant imagine youre not more fashionable because you positively have the gift.

  3. edhardy Says:

    March 14, 2011 9:30 am

    Thomasville criminal court said. Criminal court said that crash transpired on Mon afternoon. The investigation then directed deputies towards business wherever police reported they found counterfeit jewellery and glasses in units.

  4. December 1, 2010 5:15 pm

    I would suggest using an it support provider, it worked out much cheaper for us in the long run than trying to do it ourselves

  5. August 9, 2010 3:52 am

    Can I track emails with piwik yet, I’ve tried but couldn’t get any datas , I get some datas only after someone click on a link, but it doesn’t report if an email was read or not. Has anybody tried this? need help.

  6. whit3h4t Says:

    July 30, 2010 7:44 am

    Seems that you work hard on Piwik for beeing a better alternitive aside analytics. definitley a good way, i think i will try piwik on one of my sites the next weeks

Leave a Reply

Post Comment