We have encountered an issue with TrackEvent, when you send an event value like 12225057, the value is becoming 12225100 on matomo dashboard.
When you send an event value like 719 then it is recorded correctly.
Can you check if it's reported correctly in the visitor log? Or where is it reported wrongly?
It is reported wrongly in the visitor log. As I said earlier event value 12225057 is being reported as 12225100 in the visitor log.
There is also a bug that event value does not take string. Contrary to what the documentation says. If you pass a string to event value then visitor log shows 0.
Are you using the latest version of Matomo?
I suppose you're meaning sending like 5
instead of 5
. This should work.
I don't know what version of Matomo I am using, I am just following the Matomo documentation:
<!-- Matomo -->
<script type="text/javascript">
var _paq = window._paq || [];
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="//{$PIWIK_URL}/";
_paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', {$IDSITE}]);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
})();
</script>
<!-- End Matomo Code -->
I'm not seeing the trackEvent call there?
It be important for us to know the Matomo version before we look into this any further. Thanks
the example I provided was the JavaScript bootStrap, below is an example of the call we use to track an event
_paq.push(['trackEvent', 'Category', 'Action', 'name', 12225057);
It seems this a restriction in the database with the float
type. I can for example set 12225200
but not 12225201
.
MySQL says in their documentation MySQL performs rounding when storing values,
@mattab not sure if we want to change the column type as part of Matomo 4?
Can't remember now why we picked Float :thinking:
but be good to change the type so we can trust that Event values are tracked properly. This could otherwise create nasty bugs... Thoughts?