How to read events from Google Analytics API?

17,730

You would set your dimensions to:

ga:eventCategory, ga:eventAction, ga:eventLabel

And then you'd set your filter to:

ga:eventCategory==myEventCategory

Share:
17,730

Related videos on Youtube

Christoffer
Author by

Christoffer

Updated on June 22, 2022

Comments

  • Christoffer
    Christoffer almost 2 years

    How do I read custom events from the Google Analytics API (e.g. with the help of gapi.class.php)?

    If I have three events (myEvent1, myEvent2 and myEvent3) and they all belong to eventCategory myEventCategory, how do I read that data?

    I have been searching the API docs but found nothing on retrieving the results of event tracking.

  • brenjt
    brenjt over 12 years
    Exactly what I needed to know. Thanks
  • user2636556
    user2636556 about 9 years
    @Yahel what about the metrics? leave it blank?
  • Gowtham
    Gowtham almost 9 years
    @user2636556 It will not work if you leave it blank. Fill it with ga:totalEvents or ga:uniqueEvents.
  • FlorianT.
    FlorianT. almost 8 years
    For me [code]ga:eventCategory==myEventCategory[/code] does not work. It gives me: "Invalid dimension or metric"...
  • Alan
    Alan almost 6 years
    @Mollo you could try test it here: ga-dev-tools.appspot.com/query-explorer