Method: properties.dataStreams.getGlobalSiteTag

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

string

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: properties/123/dataStreams/456/globalSiteTag

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

string

Output only. Resource name for this GlobalSiteTag resource. Format: properties/{property_id}/dataStreams/{stream_id}/globalSiteTag Example: "properties/123/dataStreams/456/globalSiteTag"

snippet

string

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.readonly
  • https://www.googleapis.com/auth/analytics.edit