API VisitsSummary.get differs from Piwik's user interface

Hi everyone,

I’m currently trying to fix a bug I don’t understand at all : The datas I’m getting from the VisitsSummary.get API function does not match the datas I can see on the Piwik’s user interface.

My request is like this :
http://demo.piwik.org/?module=API&format=XML&token_auth=my_token&method=VisitsSummary.get&idSite=1&period=day&date=2015-12-15,2015-12-22&segment=pageUrl=@http://my_domain.com/devis/obseques?,pageUrl==http://my_domain.com/devis/obseques

The bounce rate i’m getting is ridiculously low, between 0% and 5%, and Piwik’s user interface gives me a bounce rate around 50% or 60%, which is the kind of rate i’m used to. I’m sure I had verified the datas I was retrieving with the API in the past, so I’m wondering why is it so different now ? Has something changed during the last Piwik update ?

I’ve tried another API function : http://demo.piwik.org/?module=API&format=XML&token_auth=my_token&method=Actions.getPageUrls&idSite=1&period=range&date=2015-12-15,2015-12-22&expanded=1&segment=pageUrl=@http://my_domain.com/devis/obseques-2?,pageUrl==http://my_domain.com/devis/obseques-2
I’m getting the same datas than the Piwik UI, around 60% boucne rate, so I’m sure there is a problem with VisitSummary, or with the way I use it.

Thanks for the support,
Valentin

Actually, I’ve understood something : The bounce count is only counted for the entries on this page. So it has to be divided by the number of entries in order to get the bounce rate.

VisitSummary is not calculating the bounce rate like this, it is dividing the bounce count by the number of visits, which results in a bounce rate way much lower.

Is it possible to fix it somehow, in order to get the same result with VisitSummary than with the user interface ?

this is a bug in Piwik, please post your comment / findings / suggestion in this ticket: https://github.com/piwik/piwik/issues/9199

All right, I’ll do it. Thanks for your help.

Valentin