Property ID

  • The Google Analytics Data API v1 reports on Google Analytics properties and requires a numeric property identifier.

  • The property identifier is specified in the URL path for API requests, or using a property parameter in client libraries.

  • To use the Data API, the property must be a Google Analytics property, not a Universal Analytics property.

  • You can find your Google Analytics property ID in Google Analytics settings, Firebase project settings if linked, or through your AdMob app if linked to Firebase.

The Google Analytics Data API v1 produces reports for Google Analytics properties. API requests are required to specify a numeric Google Analytics property identifier. The documentation and sample code of the Data API refer to this ID as GA_PROPERTY_ID.

Usage

All Data API methods require the Google Analytics property identifier to be specified inside a URL request path in the form of properties/GA_PROPERTY_ID, such as:

  POST https://analyticsdata.googleapis.com/v1beta/properties/GA_PROPERTY_ID:runReport

If you are using one of the Data API client libraries, there is no need to manipulate the request URL path manually. Most API clients provide a property parameter that expects a string in the form of properties/GA_PROPERTY_ID. See Quick start guide for examples of using the client libraries.

What is my property ID?

You can use the Data API if you have configured analytics reports in either of the following products:

Google Analytics

Google Analytics has multiple types of Properties. To use the Data API, a property must be a Google Analytics property, as opposed to Universal Analytics. Universal Analytics is an older version of Google Analytics and is not supported by the Data API.

To determine a Google Analytics property ID:

  1. Visit Google Analytics at https://analytics.google.com/.
  2. Select Admin.
  3. Select the Property.
  4. Select Property Settings.

If the Property Settings shows a numeric "PROPERTY ID" such as "123...", this is the numeric ID of your Google Analytics property.

Firebase

If you have linked Google Analytics to Firebase, you will see analytics data for your project in Firebase. To learn more about linking, see Link Google Analytics to Firebase.

To determine the Google Analytics property for a Firebase project:

  1. Visit the Firebase console at https://console.firebase.google.com/.
  2. Select your project.
  3. Select Project settings.
  4. Select Integrations.
  5. Select your Google Analytics Integration.

The Google Analytics Integration page will show a numeric "Property ID" such as "123...". This is the numeric ID of your Google Analytics property.

AdMob

If you use AdMob, your app must be linked to Firebase to use Google Analytics. To access user metrics within AdMob and use the Google Analytics Data API, you must have:

  1. Linked your AdMob app to a Firebase project.
  2. Integrated the Google Analytics for Firebase SDK into your app.
  3. Enabled user metrics for your app in AdMob.

These steps are required to collect user metrics for AdMob and to explore and work with this data using Google Analytics and the Data API.

To find the Google Analytics Property ID associated with your AdMob app:

  1. Sign in to AdMob.
  2. Select your app from the app list.
  3. In the sidebar, select App settings.
  4. In the Firebase section, you should see details about the linked Firebase project. Click the appropriate link or button to navigate to the Firebase console.
    • Alternative path: Sometimes, a link to the Firebase dashboard might be available on the App overview page.
  5. In the Firebase console, you are viewing the project linked to your AdMob app. Follow the instructions outlined in the Firebase section to find the Property ID:
    • Select Project settings (gear icon next to Project Overview).
    • Go to the Integrations tab.
    • Select the Google Analytics integration to view the Property ID.