Google Analytics API – Part 2

Now its time to get data from Analytics API. We already coded a login procedure and set up an AnalyticsService object. Now we can use it to get data that you normally view with Googles Analytics online tool.

Analytics hierarchy

Before we will get data, we should get an idea oh the hierarchy of an Analytic account. This is important when you want to request data.

An account is divided in three levels:

  • Account
    an account is represented as an unique Analytics ID. This ID exists, because with it you can make accounts where you can control more than one Analytics account. Normally you will only have one Analytics ID for each Google account.
  • Webproperty
  • Profil
    A profile is the last level. There you will find data.

We can step through this hierarchy the following way:

When you get to the profile level, you can request data for this profile!

Part 1 | Part 3

(Visited 262 times, 1 visits today)

Leave a Reply

Your email address will not be published. Required fields are marked *