{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "#/components/schemas/Goal", "title": "Goal", "description": "JSON template for Analytics goal resource.", "properties": { "accountId": { "description": "Account ID to which this goal belongs.", "type": "string", "example": "123456" }, "active": { "description": "Determines whether this goal is active.", "type": "boolean", "example": true }, "created": { "description": "Time this goal was created.", "format": "date-time", "type": "string", "example": "2026-04-17T12:00:00Z" }, "eventDetails": { "description": "Details for the goal of the type EVENT.", "properties": { "eventConditions": { "description": "List of event conditions.", "items": { "properties": { "comparisonType": { "description": "Type of comparison. Possible values are LESS_THAN, GREATER_THAN or EQUAL.", "type": "string" }, "comparisonValue": { "description": "Value used for this comparison.", "format": "int64", "type": "string" }, "expression": { "description": "Expression used for this match.", "type": "string" }, "matchType": { "description": "Type of the match to be performed. Possible values are REGEXP, BEGINS_WITH, or EXACT.", "type": "string" }, "type": { "description": "Type of this event condition. Possible values are CATEGORY, ACTION, LABEL, or VALUE.", "type": "string" } }, "type": "object" }, "type": "array" }, "useEventValue": { "description": "Determines if the event value should be used as the value for this goal.", "type": "boolean" } }, "type": "object" }, "id": { "description": "Goal ID.", "type": "string", "example": "123456" }, "internalWebPropertyId": { "description": "Internal ID for the web property to which this goal belongs.", "type": "string", "example": "123456" }, "kind": { "default": "analytics#goal", "description": "Resource type for an Analytics goal.", "type": "string", "example": "example_value" }, "name": { "description": "Goal name.", "type": "string", "example": "Example Name" }, "parentLink": { "description": "Parent link for a goal. Points to the view (profile) to which this goal belongs.", "properties": { "href": { "description": "Link to the view (profile) to which this goal belongs.", "type": "string" }, "type": { "default": "analytics#profile", "description": "Value is \"analytics#profile\".", "type": "string" } }, "type": "object" }, "profileId": { "description": "View (Profile) ID to which this goal belongs.", "type": "string", "example": "123456" }, "selfLink": { "description": "Link for this goal.", "type": "string", "example": "example_value" }, "type": { "description": "Goal type. Possible values are URL_DESTINATION, VISIT_TIME_ON_SITE, VISIT_NUM_PAGES, AND EVENT.", "type": "string", "example": "ACTIVE" }, "updated": { "description": "Time this goal was last modified.", "format": "date-time", "type": "string", "example": "2026-04-17T12:00:00Z" }, "urlDestinationDetails": { "description": "Details for the goal of the type URL_DESTINATION.", "properties": { "caseSensitive": { "description": "Determines if the goal URL must exactly match the capitalization of visited URLs.", "type": "boolean" }, "firstStepRequired": { "description": "Determines if the first step in this goal is required.", "type": "boolean" }, "matchType": { "description": "Match type for the goal URL. Possible values are HEAD, EXACT, or REGEX.", "type": "string" }, "steps": { "description": "List of steps configured for this goal funnel.", "items": { "properties": { "name": { "description": "Step name.", "type": "string" }, "number": { "description": "Step number.", "format": "int32", "type": "integer" }, "url": { "description": "URL for this step.", "type": "string" } }, "type": "object" }, "type": "array" }, "url": { "description": "URL for this goal.", "type": "string" } }, "type": "object" }, "value": { "description": "Goal value.", "format": "float", "type": "number", "example": 42.5 }, "visitNumPagesDetails": { "description": "Details for the goal of the type VISIT_NUM_PAGES.", "properties": { "comparisonType": { "description": "Type of comparison. Possible values are LESS_THAN, GREATER_THAN, or EQUAL.", "type": "string" }, "comparisonValue": { "description": "Value used for this comparison.", "format": "int64", "type": "string" } }, "type": "object" }, "visitTimeOnSiteDetails": { "description": "Details for the goal of the type VISIT_TIME_ON_SITE.", "properties": { "comparisonType": { "description": "Type of comparison. Possible values are LESS_THAN or GREATER_THAN.", "type": "string" }, "comparisonValue": { "description": "Value used for this comparison.", "format": "int64", "type": "string" } }, "type": "object" }, "webPropertyId": { "description": "Web property ID to which this goal belongs. The web property ID is of the form UA-XXXXX-YY.", "type": "string", "example": "123456" } }, "type": "object" }