Перейти к консоли

Method: projects.getAnalyticsDetails

Gets the Google Analytics details currently associated with a 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 fully qualified resource name, in the format:

projects/projectId/analyticsDetails

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 specified FirebaseProject.

streamMappings[]

object (StreamMapping)

For Android Apps and iOS Apps: A map of app to streamId for each Firebase App in the specified FirebaseProject. Each app and streamId appears only once.

For Web Apps: A map of app to streamId and measurementId for each Firebase App 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
}
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 your 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.

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 fully qualified resource name of the Firebase App associated with the Google Analytics data stream, in the format:

projects/projectId/androidApps/appId

or

projects/projectId/iosApps/appId

or

projects/projectId/webApps/appId

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.

Try it!