Take our developer survey. We want your feedback so we can learn how to improve Google Analytics, and make it an even better tool for you.

Property ID

The Google Analytics Data API v1 produces reports for GA4 properties. API requests are required to specify a numeric GA4 property identifier.

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 GA4 property. To determine if a property is GA4:

  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...", specify that numeric Id in the propertyId field in API requests.

If the Property Settings shows a "Tracking Id" such as "UA-123...-1", this Property is a Universal Analytics property, and the Analytics data for that property cannot be reported on in the Data API. For that property, you can use the Google Analytics Reporting API v4 to produce analytics data reports.

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 GA4 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...". Specify that numeric Id in the propertyId field in API requests.

AdMob

If you have enabled user metrics and linked your apps to Firebase in AdMob, you will see user metrics in AdMob for your app.

To determine the GA4 property for an AdMob app:

  1. Visit AdMob at https://apps.admob.com/.
  2. Select your app.
  3. Select App Overview.
  4. Select "FIREBASE DASHBOARD".
  5. Follow the above Firebase instructions starting with "Select Project settings."