Reputation: 118
Possible similar question: GA total results is significantly less with hour dimension than with date dimension -hour-dimension-than-with-date-dimens but i use samplingLevel=HIGHER_PRECISION
I am registering my events as follows:
ga('send', 'event', 'search_event_category', 'search_term', 'location');
category = search_event_category
action = search_term
label = location
I would pull a report via the ga api to return me on the rows the relationship between action and label:
["search_event_category",
"search_term",
"location",
"2"]
I got this return using the following parameters in the query:
metrics=ga:totalEvents
dimensions=ga:eventAction,ga:eventLabel
&filters=ga:eventCategory==search_event_category
&samplingLevel=HIGHER_PRECISION
&start-index=1
&max-results=10000
But I realized that the total results is less than I expected:
totalsForAllResults": {
"ga:totalEvents": "57623"
}
I expected totalEvents 80832. In GA interface, i get this value
when I send "dimensions=ga:eventAction" i get "totalsForAllResults": {"ga:totalEvents": "80832"}
when I send "dimensions=ga:eventLabel" i get "totalsForAllResults": {"ga:totalEvents": "57623"}
when I send "dimensions=ga:eventLabel,ga:eventAction" It looks like it does a 'inner join' and i get "totalsForAllResults": {"ga:totalEvents": "57623"}
I'm doing the right way?
I know how difficult without help data, but put here pictures that prove that there is in ga relationship that was not returned by the query
evidence that the relationship exists in ga
Upvotes: 0
Views: 417
Reputation: 30431
If you're sending events to GA that don't include an event label, then when you query for events and specify the ga:eventLabel
dimension, events without a label will be dropped from the returned result set. That's the most likely reason for the number discrepancy.
To avoid this problem, I'll sometimes set the event label to "(not set)" to mimic how GA internally indicates that a dimension value is unknown.
Upvotes: 1