Take our developer survey. We want your feedback so we can learn how to improve Google Analytics, and make it an even better tool for you.

Method: properties.webDataStreams.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/*/webDataStreams/*/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}/webDataStreams/{stream_id}/globalSiteTag Example: "properties/123/webDataStreams/456/globalSiteTag"

Request body

The request body must be empty.

Response body

If successful, the response body contains data with the following structure:

Read-only resource with the tag for sending data from a website to a WebDataStream.

JSON representation
{
  "snippet": string
}
Fields
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 the following OAuth scope:

  • https://www.googleapis.com/auth/analytics.readonly