Method: properties.fetchConnectedGa4Property
Mając podaną usługę w UA, wyszukuje połączoną z nią usługę w GA4. Uwaga: tej opcji nie można używać w usługach GA4.
Żądanie HTTP
GET https://analyticsadmin.googleapis.com/v1alpha/properties:fetchConnectedGa4Property
Adres URL używa składni transkodowania gRPC.
Parametry zapytania
Parametry |
property |
string
Wymagane. usługę w UA, w której przypadku chcesz wyszukać połączoną usługę w GA4. Pamiętaj, że to żądanie używa wewnętrznego identyfikatora usługi, a nie identyfikatora śledzenia z formularza UA-XXXXXX-YY. Format: properties/{internal_web_property_id} Przykład: properties/1234
|
Treść żądania
Treść żądania musi być pusta.
Treść odpowiedzi
Odpowiedź na wyszukiwanie usługi w GA4 połączonej z usługą w UA.
W przypadku powodzenia treść żądania zawiera dane o następującej strukturze:
Zapis JSON |
{
"property": string
} |
Pola |
property |
string
usługę w GA4 połączoną z usługą w UA, Gdy nie ma połączonej usługi w GA4, zwracany jest pusty ciąg znaków. Format: properties/{property_id} Przykład: properties/1234
|
Zakresy autoryzacji
Wymaga jednego z tych zakresów protokołu OAuth:
https://www.googleapis.com/auth/analytics.readonly
https://www.googleapis.com/auth/analytics.edit
O ile nie stwierdzono inaczej, treść tej strony jest objęta licencją Creative Commons – uznanie autorstwa 4.0, a fragmenty kodu są dostępne na licencji Apache 2.0. Szczegółowe informacje na ten temat zawierają zasady dotyczące witryny Google Developers. Java jest zastrzeżonym znakiem towarowym firmy Oracle i jej podmiotów stowarzyszonych.
Ostatnia aktualizacja: 2024-08-29 UTC.
[null,null,["Ostatnia aktualizacja: 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"]]