Search code examples
google-analyticsuniversal-analyticsevent-tracking

Inaccurate Event Value in Google Analytics


I have problem with event in Google Analytics. the Event Action shows inaccurate(negative) value in large amount.

Screenshot :

enter image description here

Event Tracking code for Event Action (Play Done) :

ga('send', 'event', { eventCategory: 'Mziiki Song Streaming', eventAction: 'Play Done', eventLabel: song_title, eventValue: total_sec});

Here, song_title & total_sec is dynamic values.

Any help will be highly appreciated. Thanks.


Solution

  • I've seen this happen when the event value has been passed as a string instead of numeric. Try wrapping the value in an explicit parseInt():

    ga('send', 'event', { eventCategory: 'Mziiki Song Streaming', eventAction: 'Play Done', eventLabel: song_title, eventValue: parseInt(total_sec)});