Negative Event Values in Google Analytics

My colleague Christoffer has played around with negative event values in Google Analytics and proven that it is possible to combine negative and positive values and report on them. It’s not recommended by Google, but it is possible to do.

Say you let visitors rate a page and that −10 equals “very unhappy,” 10 equals “very happy,” and 0 equals “no opinion”. If you have three votes and one is for “very happy,” one for “very unhappy,” and one for “no opinion,” the “very happy” and the “very unhappy” votes would cancel each other out. Now, if you’d have two votes for “very unhappy” and one for “very happy,” you’d get ((−10×2) + 10) ÷ 3 = −3.3. You would instantly be able to tell that there are more “unhappy” than “happy” votes.

Now, you should be looking at “Avg. Value” and not “Site Avg.” in the Event Tracking-Actions report.

In this example code, you should replace “My page” with the name of the page the visitor is rating:

pageTracker._trackEvent(‘Rating’, ‘My page’, ‘Very unhappy’, -10);
pageTracker._trackEvent(‘Rating’, ‘My page’, ‘No opinion’, 0);
pageTracker._trackEvent(‘Rating’, ‘My page’, ‘Very happy’, 10);