AI-generated Key Takeaways
-
This resource returns the immutable Site Tag for a specified web stream.
-
The HTTP request uses a GET method with a specific URL format including path parameters for the property and stream IDs.
-
The request body is empty, while the response body contains a JSON representation with the resource name and a JavaScript code snippet.
-
Authorization requires either the
analytics.readonlyoranalytics.editOAuth scopes.
Returns the Site Tag for the specified web stream. Site Tags are immutable singletons.
HTTP request
GET https://analyticsadmin.googleapis.com/v1alpha/{name=properties/*/dataStreams/*/globalSiteTag}
The URL uses gRPC Transcoding syntax.
Path parameters
| Parameters | |
|---|---|
name |
Required. The name of the site tag to lookup. Note that site tags are singletons and do not have unique IDs. Format: properties/{property_id}/dataStreams/{stream_id}/globalSiteTag Example: |
Request body
The request body must be empty.
Response body
Read-only resource with the tag for sending data from a website to a DataStream. Only present for web DataStream resources.
If successful, the response body contains data with the following structure:
| JSON representation |
|---|
{ "name": string, "snippet": string } |
| Fields | |
|---|---|
name |
Output only. Resource name for this GlobalSiteTag resource. Format: properties/{property_id}/dataStreams/{stream_id}/globalSiteTag Example: "properties/123/dataStreams/456/globalSiteTag" |
snippet |
Immutable. JavaScript code snippet to be pasted as the first item into the head tag of every webpage to measure. |
Authorization scopes
Requires one of the following OAuth scopes:
https://www.googleapis.com/auth/analytics.readonlyhttps://www.googleapis.com/auth/analytics.edit