Event Value ? Google analytics / measurement protocol
Asked Answered
R

1

38

How to use event value / view it when I use event tracking with measurement protocol. Currently in events tab in google analytics UI, I can check category , action but cant see the value associated with it that I sent to GA.

Thanks

Rizika answered 28/3, 2014 at 19:13 Comment(0)
J
68

First off, make sure you are passing a correct value to the value argument. The value argument expects an integer value (not string), e.g.

// bad
_gaq.push(['_trackEvent', 'Category', 'Action', 'Label', "some random string"]);

// bad
_gaq.push(['_trackEvent', 'Category', 'Action', 'Label', "123"]);

// good
_gaq.push(['_trackEvent', 'Category', 'Action', 'Label', 123]);

2nd, Category, Action, and Label are dimensions; what you see on the left side of a given report. Value, on the other hand, is a metric; what you see on the right side of the report. This is what makes for the actual numbers you are looking at when you go to your events reports and look at category/action/label reports. A dimension is what the event was. dimension values are unique values per row. A metric is a quantifier for the dimension, e.g. how many times the event happened, or averages, etc..

For example:

Event Category      Total Events  Unique Events  Event Value  Avg. Value
------------------------------------------------------------------------
some category       20            8              0            0
another category    18            12             0            0

value Those last 2 columns are populated by what you specify for the value argument in the _trackEvent call. The default value for an event is 0. So if you don't set it, all you are going to see is 0's in the Event Value and Avg. Value columns.

So let's say you have event tracking added on some links and buttons on your site. Let's say you have things wired up to trigger the following on a certain button:

_gaq.push(['_trackEvent', 'Links and Buttons', 'click', 'CTA', 'buy me!', 1]);

For simplifying Unique Events we'll say all 10 clicks were done by the same person. But note that Unique Events is a per visitor deduped Total Events value.

In your category report you should see something like this:

Event Category      Total Events  Unique Events  Event Value  Avg. Value
------------------------------------------------------------------------
Links and Buttons   10            1              10           1 

Event Value is calculated by Total Events * value where value is what you specified in the _trackEvent call. Since you specified the value as 1, and there were 10 clicks, that makes for a total of 10 in the Event Value column.

Avg. Value is calculated by Event Value / Total Events. So in this scenario you have 10 events and a total event value of 10 since they are 1 value each, so the average value is 1.

Another example, let's say you have a regular link that you want to give a value of 1 per click, and you want to give you CTA links a higher value of 2 since they are worth more

// on your header language link
_gaq.push(['_trackEvent', 'Links and Buttons', 'click', 'header links', 'language', 1]);

// on your CTA button
_gaq.push(['_trackEvent', 'Links and Buttons', 'click', 'CTA', 'buy me!', 2]);

now let's say the header language link was clicked 10 times and the cta button was clicked 5 times (again, don't pay attention to Unique Events since this will vary depending on how many people click what). This is what you should expect to see:

Event Category      Total Events  Unique Events  Event Value  Avg. Value
------------------------------------------------------------------------
Links and Buttons   15            2              20           1.3

If you look at the event label as the dimension instead, you will see something like this:

Event Label      Total Events  Unique Events  Event Value  Avg. Value
------------------------------------------------------------------------
language         10            1              10           1
buy me!          5             1              10           2
Jurado answered 28/3, 2014 at 20:10 Comment(4)
Thanks for this! Can you provide some scenarios as to how someone can use this information? Why even give values at all etc? Or supply a link to read more bout it. I'm currently researching this. any help would be great!Funches
@Funches Basically, it's for weighting conversions. For example, signing up for a free account on your site is likely not worth as much as signing up for some premium/paid-for account.Jurado
@Funches or, you can use it for stuff like.. time consumed on a video.Jurado
What option is there if we need string as values? e.g. "is this helpful?" : 'yes', 'no', or 'unknown'Irishirishism

© 2022 - 2024 — McMap. All rights reserved.