API VisitsSummary.get differs from Piwik's user interface


(Valentin Shamsnejad) #1

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


(Valentin Shamsnejad) #2

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 ?


(Matthieu Aubry) #3

this is a bug in Piwik, please post your comment / findings / suggestion in this ticket: Bounce count / rate might not be accurate: add Non-interaction events feature · Issue #9199 · matomo-org/piwik · GitHub


(Valentin Shamsnejad) #4

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

Valentin