Method: projects.getAnalyticsDetails

Gets the Google Analytics details currently associated with the specified FirebaseProject.

If the FirebaseProject is not yet linked to Google Analytics, then the response to projects.getAnalyticsDetails is NOT_FOUND.

HTTP request

GET https://firebase.googleapis.com/v1beta1/{name=projects/*/analyticsDetails}

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
name

string

The resource name of the FirebaseProject, in the format:

projects/PROJECT_IDENTIFIER/analyticsDetails

Refer to the FirebaseProject name field for details about PROJECT_IDENTIFIER values.

Request body

The request body must be empty.

Response body

If successful, the response body contains data with the following structure:

JSON representation
{
  "analyticsProperty": {
    object (AnalyticsProperty)
  },
  "streamMappings": [
    {
      object (StreamMapping)
    }
  ]
}
Fields
analyticsProperty

object (AnalyticsProperty)

The Analytics Property object associated with the specified FirebaseProject.

This object contains the details of the Google Analytics property associated with the Project.

streamMappings[]

object (StreamMapping)

  • For AndroidApps and IosApps: a map of app to streamId for each Firebase App in the specified FirebaseProject. Each app and streamId appears only once.
  • For WebApps: a map of app to streamId and measurementId for each WebApp in the specified FirebaseProject. Each app, streamId, and measurementId appears only once.

Authorization Scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloud-platform
  • https://www.googleapis.com/auth/cloud-platform.read-only
  • https://www.googleapis.com/auth/firebase
  • https://www.googleapis.com/auth/firebase.readonly

For more information, see the Authentication Overview.

AnalyticsProperty

Details of a Google Analytics property

JSON representation
{
  "id": string,
  "displayName": string,
  "analyticsAccountId": string
}
Fields
id

string

The globally unique, Google-assigned identifier of the Google Analytics property associated with the specified FirebaseProject.

If you called projects.addGoogleAnalytics to link the FirebaseProject with a Google Analytics account, the value in this id field is the same as the ID of the property either specified or provisioned with that call to projects.addGoogleAnalytics.

displayName

string

The display name of the Google Analytics property associated with the specified FirebaseProject.

analyticsAccountId

string

Output only. The ID of the Google Analytics account for the Google Analytics property associated with the specified FirebaseProject.

StreamMapping

A mapping of a Firebase App to a Google Analytics data stream

JSON representation
{
  "app": string,
  "streamId": string,
  "measurementId": string
}
Fields
app

string

The resource name of the Firebase App associated with the Google Analytics data stream, in the format:

projects/PROJECT_IDENTIFIER/androidApps/APP_ID

or

projects/PROJECT_IDENTIFIER/iosApps/APP_ID

or

projects/PROJECT_IDENTIFIER/webApps/APP_ID

Refer to the FirebaseProject name field for details about PROJECT_IDENTIFIER values.

streamId

string (int64 format)

The unique Google-assigned identifier of the Google Analytics data stream associated with the Firebase App.

Learn more about Google Analytics data streams in the Analytics documentation.

measurementId

string

Applicable for Firebase Web Apps only.

The unique Google-assigned identifier of the Google Analytics web stream associated with the Firebase Web App. Firebase SDKs use this ID to interact with Google Analytics APIs.

Learn more about this ID and Google Analytics web streams in the Analytics documentation.