: Google analytics - how do I submit a non-integer event value? I'm using the following code to submit events to GA: <script> (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
I'm using the following code to submit events to GA:
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','analytics');
var ga = function() {};
analytics('create', 'UA-90679999-1', 'auto');
analytics('send', 'event', 'item', 'purchase', 'none', '0.13');
</script>
The manual says that the event value should be an integer and I've just verified that it doesn't work with non-integers.
However oddly enough some items have fractions in their prices, and it seems dumb to always have to divide the event/goal values I see in GA by 100 if I submit in cents. Is there a workaround to send non-integer values to GA?
More posts by @Frith620
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.