≡ Menu

How to use Piwik on your iPhone

Where to find a user's token in Piwik

Introductory note: Even though an official iPhone app for Piwik is available, in my view it’s cluttered and painful to use.

So you’re using Piwik for web analytics. And also, you have an iPhone.

Don’t you hate it that you can’t really use Piwik on your iPhone due to the lack of graphs? Just because, well, they’re built in Flash — and we all know that‘s not going to be available on iPhone any time soon. Or at all.

So, I sat down with a friend of mine and coded a web app: Piwik for iPhone. It fetches your data using the API and visualizes them using HTML5’s canvas. Gotta love Safari!

All you need is an iPhone (obviously), the URL of your Piwik installation and a token for a user with read permissions.

How to set this up

Here’s what you do exactly:

  1. Log into your Piwik installation, select “Settings” in the top right corner and then the tab “Users.”

  2. Choose a user with “view” permissions (create one if necessary) and copy her “token_auth” column from the bottom table. See the screenshot for details.

    Do yourself a favor and send yourself an e-mail with the token — that way, you can copy and paste it on your iPhone!

  3. Take your phone and go to http://awendt.github.com/piwik-iphone

  4. The settings screen appears automatically. Fill in the URL of your Piwik installation and paste the user’s token from the e-mail. These information are stored on your iPhone for your convenience.

  5. Click on “Show sites”. Your Piwik installation is queried for all websites that user can access.

  6. Select a website and click “Save.” If your Piwik installation only tracks one website, you still have to do that step, sorry.

  7. You should now be on the dashboard, ready to see your stats.

  8. If you’d like to see stats of another website (or an entirely different Piwik installation), click the “Settings” button on the top right.


This little web app is put together by Sebastian and me. It only looks good on iPhone.

We couldn’t have made it if it weren’t for these projects:

The source code is released under the MIT license, so you can go ahead and hack away if you want.

What do you think?

Now it’s your turn — we need your opinion! What statistics would you like to have available on your dashboard? What do we need to improve? Please let us know in the comments. (Or, you can create an issue on the project page.)