필수 항목입니다. 조회할 사이트 태그의 이름입니다. 사이트 태그는 싱글톤이며 고유 ID가 없습니다. 형식: properties/{property_id}/dataStreams/{stream_id}/globalSiteTag
예: properties/123/dataStreams/456/globalSiteTag
요청 본문
요청 본문은 비어 있어야 합니다.
응답 본문
웹사이트에서 DataStream으로 데이터를 전송하기 위한 태그가 있는 읽기 전용 리소스입니다. 웹 DataStream 리소스에만 제공됩니다.
성공할 경우 응답 본문에 다음 구조의 데이터가 포함됩니다.
JSON 표현
{"name": string,"snippet": string}
필드
name
string
출력 전용입니다. 이 GlobalSiteTag 리소스의 리소스 이름입니다. 형식: properties/{property_id}/dataStreams/{stream_id}/globalSiteTag(예: 'properties/123/dataStreams/456/globalSiteTag')
snippet
string
변경할 수 없습니다. 측정할 모든 웹페이지의 head 태그에 첫 번째 항목으로 붙여넣을 JavaScript 코드 스니펫입니다.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["필요한 정보가 없음","missingTheInformationINeed","thumb-down"],["너무 복잡함/단계 수가 너무 많음","tooComplicatedTooManySteps","thumb-down"],["오래됨","outOfDate","thumb-down"],["번역 문제","translationIssue","thumb-down"],["샘플/코드 문제","samplesCodeIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-07-26(UTC)"],[[["\u003cp\u003eRetrieves the Site Tag, an immutable singleton, associated with a specific web stream.\u003c/p\u003e\n"],["\u003cp\u003eUtilizes an HTTP GET request with the format \u003ccode\u003eGET https://analyticsadmin.googleapis.com/v1alpha/{name=properties/*/dataStreams/*/globalSiteTag}\u003c/code\u003e to fetch the tag.\u003c/p\u003e\n"],["\u003cp\u003eRequires providing the web stream's name using the path parameter \u003ccode\u003ename\u003c/code\u003e in the format \u003ccode\u003eproperties/{property_id}/dataStreams/{stream_id}/globalSiteTag\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eReturns a JSON response containing the site tag's name and the JavaScript snippet for website implementation.\u003c/p\u003e\n"],["\u003cp\u003eNeeds authorization with either \u003ccode\u003ehttps://www.googleapis.com/auth/analytics.readonly\u003c/code\u003e or \u003ccode\u003ehttps://www.googleapis.com/auth/analytics.edit\u003c/code\u003e scope.\u003c/p\u003e\n"]]],["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"],null,[]]