Method: properties.dataStreams.getGlobalSiteTag
지정된 웹 스트림의 사이트 태그를 반환합니다. 사이트 태그는 변경할 수 없는 싱글톤입니다.
HTTP 요청
GET https://analyticsadmin.googleapis.com/v1alpha/{name=properties/*/dataStreams/*/globalSiteTag}
URL은 gRPC 트랜스코딩 문법을 사용합니다.
경로 매개변수
매개변수 |
name |
string
필수 항목입니다. 조회할 사이트 태그의 이름입니다. 사이트 태그는 싱글톤이며 고유 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 코드 스니펫입니다.
|
승인 범위
다음 OAuth 범위 중 하나가 필요합니다.
https://www.googleapis.com/auth/analytics.readonly
https://www.googleapis.com/auth/analytics.edit
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2024-08-22(UTC)
[null,null,["최종 업데이트: 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"]]