@rutsoluo opened this Issue on October 1st 2019

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.

@tsteur commented on October 1st 2019 Member

Can you check if it's reported correctly in the visitor log? Or where is it reported wrongly?

@rutsoluo commented on October 1st 2019

It is reported wrongly in the visitor log. As I said earlier event value 12225057 is being reported as 12225100 in the visitor log.

@rutsoluo commented on October 1st 2019

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.

https://matomo.org/docs/event-tracking/

@tsteur commented on October 2nd 2019 Member

Are you using the latest version of Matomo?

I suppose you're meaning sending like 5 instead of 5. This should work.

@rutsoluo commented on October 2nd 2019

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 -->
@tsteur commented on October 2nd 2019 Member

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

@rutsoluo commented on October 2nd 2019

3.11.0

Thanks for your help

@rutsoluo commented on October 2nd 2019

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);

@tsteur commented on October 2nd 2019 Member

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?

@mattab commented on October 3rd 2019 Member

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?

@tsteur commented on October 3rd 2019 Member

I'll put it into Matomo 4

Powered by GitHub Issue Mirror