TagSnippet

The site tag and event snippet pair for a TrackingCodeType.

JSON representation
{
  "type": enum (TrackingCodeType),
  "pageFormat": enum (TrackingCodePageFormat),
  "globalSiteTag": string,
  "eventSnippet": string
}
Fields
type

enum (TrackingCodeType)

The type of the generated tag snippets for tracking conversions.

pageFormat

enum (TrackingCodePageFormat)

The format of the web page where the tracking tag and snippet will be installed, for example, HTML.

globalSiteTag

string

The site tag that adds visitors to your basic remarketing lists and sets new cookies on your domain.

eventSnippet

string

The event snippet that works with the site tag to track actions that should be counted as conversions.

TrackingCodeType

The type of the generated tag snippets for tracking conversions.

Enums
UNSPECIFIED Not specified.
UNKNOWN Used for return value only. Represents value unknown in this version.
WEBPAGE The snippet that is fired as a result of a website page loading.
WEBPAGE_ONCLICK The snippet contains a JavaScript function which fires the tag. This function is typically called from an onClick handler added to a link or button element on the page.
CLICK_TO_CALL For embedding on a mobile webpage. The snippet contains a JavaScript function which fires the tag.
WEBSITE_CALL The snippet that is used to replace the phone number on your website with a Google forwarding number for call tracking purposes.

TrackingCodePageFormat

The format of the web page where the tracking tag and snippet will be installed.

Enums
UNSPECIFIED Not specified.
UNKNOWN Used for return value only. Represents value unknown in this version.
HTML Standard HTML page format.
AMP Google AMP page format.