Nyveria
Nyveria

Reputation: 168

How to get list of an account's events (labels, categories) from Google Analytics API

I have a request with ga:totalEvents and want to filter on e.g. event category. Now, I know that's available as dimension and that you can filter by using: ga:eventCategory==myEventCategory, but for this filter I need a list of all available event categories to choose from.

Does anyone know a way to achieve this? Thanks!

Upvotes: 0

Views: 693

Answers (1)

Linda Lawton - DaImTo
Linda Lawton - DaImTo

Reputation: 116968

you are going to have to do it in two requests.

First request get list of categories:

Dimension ga:eventCategory and metric ga:users

Save that list that is returned some place.

Second request:

Use that list to build your filters.

Upvotes: 1

Related Questions