Analytics
2.9K members online now
2.9K members online now
Ask questions about filter set-up and issues with using filters in Google Analytics reports
 
Guide Me
star_border
Reply

Building a filter with eventCategory, eventAction & eventLabel using the Google Analytics API

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

I'm trying to use the Google Analytics API to create automated reports that pull events based on one of two different Event Categories. 

 

The structure is currently set up like:

 

Event Category:

Video - Youth National Player - Playback

Video - Youth Producer Player - Playback

 

Event Action

MediaStart

 

Event Label

(a RegEx pulling from another part of the sheet)

 

I've had success with a filter that only pulls based on Event Action and Event Label:

ga:eventAction==MediaStart;ga:eventLabel=~^"&InputTab!$B$4

 

but have had zero  success when trying to add in either of the Player - Playback categories. I thought this string would help:

ga:eventCategory==Video%20&%2d%20KIDS%20Producer%20Player%20%2d%20Playback;

 

But that keeps returning zero events. Any suggestions??

 

1 Expert replyverified_user
Marked as Best Answer.
Solution
Accepted by topic author Joseph M
March 2016

Re: Building a filter with eventCategory, eventAction & eventLabel using the Google Analytics AP

Top Contributor
# 2
Top Contributor
Hi Joseph,

Have you already tried Google Analytics Query Explorer [1] for quick testing of the Analytics API? That's quite nice for debugging.

As I see, your category value containing 'KIDS' and 'producer' doesn't match your 'youth player' categories ... According to [2], URL-encoded [3] category ga:eventCategory==Video%20-%20Youth%20Producer%20Player%20-%20Playback should do the job ...

[1] https://ga-dev-tools.appspot.com/query-explorer/
[2] https://developers.google.com/analytics/devguides/reporting/core/v3/reference#filters
[3] http://meyerweb.com/eric/tools/dencoder/

Re: Building a filter with eventCategory, eventAction & eventLabel using the Google Analytics AP

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭
Thanks; I realize that I was conflating my examples. But the links are great and I was able to solve my issue. Much appreciated.

Re: Building a filter with eventCategory, eventAction & eventLabel using the Google Analytics AP

Top Contributor
# 4
Top Contributor
Glad to hear!