How to simply get the bounce rate through the API?


#1

Hello,

I am trying to learn a bit more about how to use the Piwik API in order to write some tutorials about it.
In one of them I would like to show how we can export the bounce rate for a given period into a Google spreadsheet. I just want the bounce rate, nothing more.
Here is my syntax:

=IMPORTXML(“http://demo.piwik.org/?module=API&method=VisitsSummary.get&idSite=7&period=range&date=2012-01-01,2014-01-01&format=xml&token_auth=anonymous";"//bounce_rate”)

so far, it works fine, but I would like to make it even more simple by not using the VisitsSummary method.
How can I do it? How can I just pick up a simple metrics?

Thank you very much for your answers.