Method: properties.fetchConnectedGa4Property
Für eine bestimmte UA-Property wird die damit verbundene GA4-Property gesucht. Hinweis: Diese Option kann nicht für GA4-Properties verwendet werden.
HTTP-Anfrage
GET https://analyticsadmin.googleapis.com/v1alpha/properties:fetchConnectedGa4Property
Die URL verwendet die Syntax der gRPC-Transcodierung.
Abfrageparameter
Parameter |
property |
string
Erforderlich. Die UA-Property, für die die verknüpfte GA4-Property gesucht werden soll. In dieser Anfrage wird die interne Property-ID und nicht die Tracking-ID im Format UA-XXXXXX-YY verwendet. Format: properties/{internal_web_property_id}, Beispiel: properties/1234
|
Anfragetext
Der Anfragetext muss leer sein.
Antworttext
Antwort zum Suchen nach einer mit einer UA-Property verbundenen GA4-Property.
Bei Erfolg enthält der Antworttext Daten mit der folgenden Struktur:
JSON-Darstellung |
{
"property": string
} |
Felder |
property |
string
Die GA4-Property, die mit der UA-Property verknüpft ist. Wenn keine verknüpfte GA4-Property vorhanden ist, wird ein leerer String zurückgegeben. Format: properties/{property_id}, Beispiel: properties/1234
|
Autorisierungsbereiche
Erfordert einen der folgenden OAuth-Bereiche:
https://www.googleapis.com/auth/analytics.readonly
https://www.googleapis.com/auth/analytics.edit
Sofern nicht anders angegeben, sind die Inhalte dieser Seite unter der Creative Commons Attribution 4.0 License und Codebeispiele unter der Apache 2.0 License lizenziert. Weitere Informationen finden Sie in den Websiterichtlinien von Google Developers. Java ist eine eingetragene Marke von Oracle und/oder seinen Partnern.
Zuletzt aktualisiert: 2024-08-29 (UTC).
[null,null,["Zuletzt aktualisiert: 2024-08-29 (UTC)."],[[["This document details how to look up the connected Google Analytics 4 (GA4) property for a given Universal Analytics (UA) property using the Google Analytics Admin API."],["The API request requires the internal UA property ID and returns the connected GA4 property ID, if any."],["Authentication requires specific OAuth scopes for either read-only or edit access to Analytics data."],["It is important to note that this functionality cannot be used with GA4 properties and requires an empty request body."]]],["This document details how to find a connected GA4 property using its associated UA property. A `GET` request to `https://analyticsadmin.googleapis.com/v1alpha/properties:fetchConnectedGa4Property` is made. The request requires a `property` query parameter, which is the UA property's internal ID, formatted as `properties/{internal_web_property_id}`. The request body must be empty. The response body returns a JSON structure containing a `property` field with the GA4 property ID or an empty string if none exists. The request needs authorization with specific OAuth scopes.\n"]]