More than one conversion per second

Hi,

We know there is a limitation in Piwik and it can not record more than 1 goal per second (it is documented in the file GoalRequestProcessor function afterRequestProcessed).
What changes should be made in order to avoid this limitation?
We need to record more than one goal per second for the same visit.

Using Piwiki 2.15.0

Thank you in advance

Jon

Could you maybe share what’s the use case? It’s because of high traffic or something else? Maybe it’s possible to handle it in a different way.

Hi Quba,

Thank you for your interest. I will try to explain our use case.

Regarding the conversions, we need to track to number of product downloads from our site. Those are free.

  • When a user downloads a product we track a conversion.
  • In the “Thank you” page we propose other products that could be interesting for the user.
  • The user can select up to three of them to download.
  • When to user clicks download, we would need to track as many conversions as products he has selected.
  • Currently we only get in the DB the first one from this second batch since all the three are sent in the same second.

In the complete scenario we would need to track 4 conversions and we get 2.

I hope you understand our needs and come up with an idea about how this could be done.

Thank you in advance

Jon

Hi Quba,

Any ideas on where this limitation is implemented so we can skip it while we think a better way to do it right in Piwik?
Is it at DB level or in the code?

Let me know if we provided all the information needed.

Thank you again

Jon

It’s rather a question to core developers. Most likely it was limited because of some race condition and IMO it would be nice to have this fixed in Piwik 3.0.

Hi Quba,

Thank you. We did more research last week and the limitation is basically from the conversion table. The primary key is based on idvisit, idgoal and buster. We deleted the and now it works perfectly. We can save several conversion per second by the same user and visit.

I’m not sure why there is this limit since it would make not much sense for us.

Hope somebody from the core could explain it. Any idea on how to get their attention on this topic?

Thank you again

Jon

You can post an issue on github - Issues · matomo-org/piwik · GitHub

Yes, please create a bug report on Github. - For sure, it would be good to be able to save several conversions to the same goal in the same second.

Also a workaround for this, is to set a different “time” for the conversion. For example you can record conversions 1s later, then 2s later.

Hi,

Thank you, I’ll do so.

In the meantime what we have done drop the PK for the conversions table. We did that change in a plugin.
Since then it has worked for us but on a few occasions we got duplicated conversions.

Maybe there is a better solutions for this.

Cheers

Jon