January '09

13

Posted by

in About, Meta

Comments: 38 Comments

Using the Piwik API and Google Spreadsheet to generate Excel-like custom reports

This post is from a Guest Blogger Arthur Lee from branica.com

You can say that I am a bit of an analytics freak since my background is financial and I typically work with analytical data and with spreadsheets. Now as a part-time webmaster, I find that using analytics is pretty important to optimize a site. I was intrigued with Piwik when it first arrived – especially as an alternative to Google Analytics.

When I was playing with Piwik on my site, I was looking to show my stats without having to give anonymous users view access to my stats. At the moment, it is only possible to show PiWik widgets publicly only if you give anonymous users view access. So I was curious to see if I could leverage Google Spreadsheets and the Piwik API to publish data and charts from Google Spreadsheets.

I have say that with the PiWik API is was really easy to use within Google Spreadsheets. Since Spreadsheets has the handy importXML function, it was a nice fit since the PiWik API can product its data in XML. It is also easy to change the Piwik API using normal spreadsheets functions. The result is the following Google Spreadsheet which has 3 pages to show you an example:

http://spreadsheets.google.com/ccc?key=pxxUvud3iB_ZgeTOMg64jdw#

  • Page 1 – Setup / Configuration

  • Page 2 – Dashboard Example: This example shows how to make dynamic reports since you can change the number of “Top Website Referrers” or “Top Keywords”.

  • Page 3 – Chart Example: In this example, the chart can be published anywhere as a simple image. No need for flash like Piwik widgets.

The above spreadsheet is in view only mode so you’ll need a Google account to make a copy of the spreadsheet to play around with it. Also, I have noticed a few times that Google may at times not get the XML data – just be patient. When you look at the spreadsheet, I have put in a simple setup page so you can change the reports for your site on Piwik. Just enter in your url where Piwik is installed, siteid and token_auth (that you can find on the API page in Piwik) and the reports will refresh automatically with your data!

The nice aspect of this is if you are using Piwik for commercial customers is that you can create all kinds of dynamic reports which operate in real time. I think the possibilities are pretty endless now. The only downside is the potentially performance impact of using many Piwik API calls.

Happy Reporting & Analysis!

Thank you Arthur for your guest blog post. If you would like to be a guest blogger on the Piwik blog (more than 1,200 readers!), please send us an email at hello@piwik.org ; we would love to publish your tutorial, Piwik hack or other Piwik web analytics findings!

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. Zaahid Kara Says:

    May 26, 2011 9:58 pm

    o among the cool option of this pad is it may know whenever metal, water or hand is lying on its floor and it will spontaneously shuts off the pad Adauga Anunturi Gratuite Bacau

  2. March 18, 2011 8:09 am

    of the progressive/socialist/democrats continues on and

  3. January 18, 2011 3:16 pm

    This weekend, look into how you can extend Piwik’s functionality to benefit your site.

  4. December 21, 2010 6:09 am

    Why is this Blog Engine Blogs brimful of Email.? I score seend lot’s of parcel same this… Few of them has lineament of Articles but noneffervescent equal…

  5. Arts Blog Says:

    December 20, 2010 8:39 am

    This is a great little website I can not believe that I didn’t find it earlier.

  6. referencement entreprise drôme Says:

    November 24, 2010 5:27 pm

    merci pour ce tutoriel excellent

  7. la martina Says:

    November 20, 2010 4:55 pm

    Besten Polos können Sie je sehen Sie alle sehen können BuyLa martina

  8. November 20, 2010 4:54 pm

    Besten Polos können Sie je sehen Sie alle sehen können Ropa La martina

  9. opinie Says:

    September 9, 2010 2:09 pm

    This thing is cool, works flawlessly until know and looks great. This is really good job!

    Best regards
    Opinie

  10. hostel Says:

    August 18, 2010 1:28 pm

    I`m using Piwik and custom reports are really usefull for me . ( I was using GA for long time but … I dont wan`t BIG BROTHER to know everything )

  11. August 17, 2010 7:08 pm

    Great toot, easy to install, easy to configure, available in my language :) Thi is really good job!

    Cheers

  12. Rummy City Says:

    August 1, 2010 7:01 pm

    Too much complicated for me :(
    I guess I have to read more about the subject.

  13. porady Says:

    July 22, 2010 11:51 am

    very very good!
    great yes beatiful job

  14. kosmodisk Says:

    April 22, 2010 2:07 am

    We downloaded the software and will now

  15. April 21, 2010 6:36 am

    i used it, and i can say it is better and easy than google

  16. la martina Says:

    April 14, 2010 1:18 pm

    I had no idea that Google docs could be used this way.

  17. türk sex Says:

    February 6, 2010 1:53 am

    thanx admin

  18. onlinesikis Says:

    February 6, 2010 1:53 am

    tnx

  19. onlinesikis Says:

    February 6, 2010 1:51 am

    thanx you admin

  20. February 3, 2010 3:50 pm

    oui un grand merci pour ce post

  21. Nice days Says:

    January 3, 2010 10:26 am

    thanx you admin

  22. December 22, 2009 9:49 am

    Merci pour ce post tr

  23. My Review Says:

    October 27, 2009 5:04 pm

    More than that, I think it should be encouraged

  24. October 22, 2009 6:00 pm

    Written at the begining of the year yet still very relevant, you should add your twitter link, ill follow for sure :)

  25. Marco Menke Says:

    September 23, 2009 9:39 pm

    Looks pretty good to me :) byebye Excel

  26. Arkadaş Says:

    September 22, 2009 8:31 pm

    i need to this editgrid, its so good.

  27. EnjoySilk Says:

    September 18, 2009 3:20 pm

    It’s just good to see open source products making their way into the mainstream, especially in the web analytics field.

  28. August 26, 2009 1:25 pm

    I’m seriously into it.

  29. Goran Web Says:

    July 23, 2009 9:37 pm

    Definitely going to download the software and give it a go. I am excited to know that there are other free analytics software available other than Google. Personally EditGrid is a better alternative.

  30. June 30, 2009 3:27 pm

    Keep on the good work, I think about how to contribute…

    Kind regards,

  31. Amit Pbx Says:

    June 24, 2009 9:40 am

    That’s sounds very interesting!!
    I’m going to download the software and give it a test drive.

    King of tired from using Google and I’m happy to see an open source project that covers these issues.

  32. Kagimusha Says:

    May 31, 2009 7:56 pm

    Блин чего только не бывает везде и вокруг. Я бы сказал, как то…

  33. hi Says:

    May 13, 2009 5:52 pm

    very very bad
    and
    very very good

  34. Raffael Luthiger Says:

    April 28, 2009 11:21 pm

    If you want to switch away from Google why not implement http://www.codeplex.com/PHPExcel ? You can generate many different spreadsheet outputs with it.

  35. Matthieu Says:

    February 4, 2009 10:59 pm

    keusta, we’re always very interested to receive marketing help, logo design, etc. We are still not sure about the Piwik logo and definitely looking for alternatives and new propositions. Please send your propositions to hello att piwik.org !

  36. Navin Poeran Says:

    January 20, 2009 5:37 am

    I have a question though, if i publish the stats, via google docs, will it be updated automatically? when i put the code in my webpage

  37. Branica Says:

    January 14, 2009 3:10 pm

    Yeah – this is a bit of a timing issue of when this blog post was released. I think it depends of what you want to accomplish.

    Simple, easy with not much data, I would probably use Google Docs Spreadsheets.

    For more data, I would use EditGrid until Google ups the limit on grabbing external XML calls.

  38. James Says:

    January 14, 2009 2:49 pm

    Arthur,

    Is there a reason why you are only giving an example for Google Spreadsheets and not EditGrid.

    From the forum I have used your explanation of using EditGrid to great success, and wonder why you don’t mention them here?

    All the best

    James

Leave a Reply

Post Comment