Introductory note: Even though an official iPhone app for Piwik is available, in my view it’s cluttered and painful to use.
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:
Log into your Piwik installation, select “Settings” in the top right corner and then the tab “Users.”
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!
Take your phone and go to http://awendt.github.com/piwik-iphone
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.
Click on “Show sites”. Your Piwik installation is queried for all websites that user can access.
Select a website and click “Save.” If your Piwik installation only tracks one website, you still have to do that step, sorry.
You should now be on the dashboard, ready to see your stats.
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:
- Piwik (obviously)
- jQuery as framework
- jQTouch for iPhone’s look and feel
- the jQuery Flot plugin for the plots
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.)