A Goals resource describes a goal for one of a user's profiles.
For a list of methods for this resource, see the end of this page.
Resource representations
JSON template for Analytics goal resource.
{ "id": string, "kind": "analytics#goal", "selfLink": string, "accountId": string, "webPropertyId": string, "internalWebPropertyId": string, "profileId": string, "name": string, "value": float, "active": boolean, "type": string, "created": datetime, "updated": datetime, "parentLink": { "type": "analytics#profile", "href": string }, "urlDestinationDetails": { "url": string, "caseSensitive": boolean, "matchType": string, "firstStepRequired": boolean, "steps": [ { "number": integer, "name": string, "url": string } ] }, "visitTimeOnSiteDetails": { "comparisonType": string, "comparisonValue": long }, "visitNumPagesDetails": { "comparisonType": string, "comparisonValue": long }, "eventDetails": { "useEventValue": boolean, "eventConditions": [ { "type": string, "matchType": string, "expression": string, "comparisonType": string, "comparisonValue": long } ] } }
Property name | Value | Description | Notes |
---|---|---|---|
accountId |
string |
Account ID to which this goal belongs. | |
active |
boolean |
Determines whether this goal is active. | |
created |
datetime |
Time this goal was created. | |
eventDetails |
object |
Details for the goal of the type EVENT . |
|
eventDetails.eventConditions[] |
list |
List of event conditions. | |
eventDetails.eventConditions[].comparisonType |
string |
Type of comparison. Possible values are LESS_THAN , GREATER_THAN or EQUAL . |
|
eventDetails.eventConditions[].comparisonValue |
long |
Value used for this comparison. | |
eventDetails.eventConditions[].expression |
string |
Expression used for this match. | |
eventDetails.eventConditions[].matchType |
string |
Type of the match to be performed. Possible values are REGEXP , BEGINS_WITH , or EXACT . |
|
eventDetails.eventConditions[].type |
string |
Type of this event condition. Possible values are CATEGORY , ACTION , LABEL , or VALUE . |
|
eventDetails.useEventValue |
boolean |
Determines if the event value should be used as the value for this goal. | |
id |
string |
Goal ID. | |
internalWebPropertyId |
string |
Internal ID for the web property to which this goal belongs. | |
kind |
string |
Resource type for an Analytics goal. | |
name |
string |
Goal name. | |
parentLink |
object |
Parent link for a goal. Points to the view (profile) to which this goal belongs. | |
parentLink.href |
string |
Link to the view (profile) to which this goal belongs. | |
parentLink.type |
string |
Value is "analytics#profile ". |
|
profileId |
string |
View (Profile) ID to which this goal belongs. | |
selfLink |
string |
Link for this goal. | |
type |
string |
Goal type. Possible values are URL_DESTINATION , VISIT_TIME_ON_SITE , VISIT_NUM_PAGES , and EVENT . |
|
updated |
datetime |
Time this goal was last modified. | |
urlDestinationDetails |
object |
Details for the goal of the type URL_DESTINATION . |
|
urlDestinationDetails.caseSensitive |
boolean |
Determines if the goal URL must exactly match the capitalization of visited URLs. | |
urlDestinationDetails.firstStepRequired |
boolean |
Determines if the first step in this goal is required. | |
urlDestinationDetails.matchType |
string |
Match type for the goal URL. Possible values are HEAD , EXACT , or REGEX . |
|
urlDestinationDetails.steps[] |
list |
List of steps configured for this goal funnel. | |
urlDestinationDetails.steps[].name |
string |
Step name. | |
urlDestinationDetails.steps[].number |
integer |
Step number. | |
urlDestinationDetails.steps[].url |
string |
URL for this step. | |
urlDestinationDetails.url |
string |
URL for this goal. | |
value |
float |
Goal value. | |
visitNumPagesDetails |
object |
Details for the goal of the type VISIT_NUM_PAGES . |
|
visitNumPagesDetails.comparisonType |
string |
Type of comparison. Possible values are LESS_THAN , GREATER_THAN , or EQUAL . |
|
visitNumPagesDetails.comparisonValue |
long |
Value used for this comparison. | |
visitTimeOnSiteDetails |
object |
Details for the goal of the type VISIT_TIME_ON_SITE . |
|
visitTimeOnSiteDetails.comparisonType |
string |
Type of comparison. Possible values are LESS_THAN or GREATER_THAN . |
|
visitTimeOnSiteDetails.comparisonValue |
long |
Value used for this comparison. | |
webPropertyId |
string |
Web property ID to which this goal belongs. The web property ID is of the form
UA-XXXXX-YY . |