Wymagane. Nazwa tagu witryny do wyszukania. Pamiętaj, że tagi witryny są pojedynczymi tagami i nie mają unikalnych identyfikatorów. Format: properties/{identyfikator_usługi}/dataStreams/{stream_id}/globalSiteTag
Zasób tylko do odczytu z tagiem służącym do wysyłania danych z witryny do DataStream. Występuje tylko dla zasobów internetowych DataStream.
W przypadku powodzenia treść żądania zawiera dane o następującej strukturze:
Zapis JSON
{"name": string,"snippet": string}
Pola
name
string
Tylko dane wyjściowe. Nazwa zasobu dla tego zasobu GlobalSiteTag. Format: properties/{identyfikator_usługi}/dataStreams/{id_stream}/globalSiteTag Przykład: „properties/123/dataStreams/456/globalSiteTag”
snippet
string
Stały. Fragment kodu JavaScript do wklejenia jako pierwszy element w tagu <head> każdej strony internetowej, która ma być mierzona.
[[["Łatwo zrozumieć","easyToUnderstand","thumb-up"],["Rozwiązało to mój problem","solvedMyProblem","thumb-up"],["Inne","otherUp","thumb-up"]],[["Brak potrzebnych mi informacji","missingTheInformationINeed","thumb-down"],["Zbyt skomplikowane / zbyt wiele czynności do wykonania","tooComplicatedTooManySteps","thumb-down"],["Nieaktualne treści","outOfDate","thumb-down"],["Problem z tłumaczeniem","translationIssue","thumb-down"],["Problem z przykładami/kodem","samplesCodeIssue","thumb-down"],["Inne","otherDown","thumb-down"]],["Ostatnia aktualizacja: 2024-08-22 UTC."],[[["Retrieves the Site Tag, an immutable singleton, associated with a specific web stream."],["Utilizes an HTTP GET request with the format `GET https://analyticsadmin.googleapis.com/v1alpha/{name=properties/*/dataStreams/*/globalSiteTag}` to fetch the tag."],["Requires providing the web stream's name using the path parameter `name` in the format `properties/{property_id}/dataStreams/{stream_id}/globalSiteTag`."],["Returns a JSON response containing the site tag's name and the JavaScript snippet for website implementation."],["Needs authorization with either `https://www.googleapis.com/auth/analytics.readonly` or `https://www.googleapis.com/auth/analytics.edit` scope."]]],["This outlines retrieving a web stream's Site Tag via a `GET` request to a specified URL. The required `name` parameter, formatted as `properties/{property_id}/dataStreams/{stream_id}/globalSiteTag`, identifies the Site Tag. The request body must be empty. The successful response, in JSON format, provides a `name` (resource identifier) and an immutable `snippet` (JavaScript code) for website data measurement. This can be achieved through authorization with either `analytics.readonly` or `analytics.edit` OAuth scopes.\n"]]