目標
目標的新增、讀取、更新、刪除,以及目標的彙總與時間序列。
Returns a goal's conversions and conversion rate by sessions and by visitors.
附加權限範圍
[
{
"when": "filter.type=saved",
"scopes": [
"analytics:read",
"analysis:read"
]
}
]siteIdstring必填ID of the site (see List sites).
timeRangeobject必填Reporting window. Use { "kind": "preset", "preset": "last_7_days" } or an absolute range { "kind": "absolute", "from": "…", "to": "…" } with RFC 3339 timestamps. timeZone (IANA name) sets calendar boundaries for presets and buckets.
filterobject | 任意 | nullOptional filter: { "type": "dsl", "expression": "page.path startsWith \"/blog\"" } uses the filter language, { "type": "inline", "expression": … } passes a structured expression, and { "type": "saved", "id": "…" } references a saved filter (requires analysis:read). Team queries accept dsl and inline only. Use null or omit the field for no filter.
scopestringWhich entity a filter condition selects. auto (default) picks the narrowest scope that fits the expression; event, session, and visitor force one.
"auto""event""session""visitor"goalIdstring必填ID of a goal (see List goals).
Returns a goal's conversions for each time bucket.
附加權限範圍
[
{
"when": "filter.type=saved",
"scopes": [
"analytics:read",
"analysis:read"
]
}
]siteIdstring必填ID of the site (see List sites).
timeRangeobject必填Reporting window. Use { "kind": "preset", "preset": "last_7_days" } or an absolute range { "kind": "absolute", "from": "…", "to": "…" } with RFC 3339 timestamps. timeZone (IANA name) sets calendar boundaries for presets and buckets.
filterobject | 任意 | nullOptional filter: { "type": "dsl", "expression": "page.path startsWith \"/blog\"" } uses the filter language, { "type": "inline", "expression": … } passes a structured expression, and { "type": "saved", "id": "…" } references a saved filter (requires analysis:read). Team queries accept dsl and inline only. Use null or omit the field for no filter.
scopestringWhich entity a filter condition selects. auto (default) picks the narrowest scope that fits the expression; event, session, and visitor force one.
"auto""event""session""visitor"goalIdstring必填ID of a goal (see List goals).
intervalstring必填Bucket size of the time series: minute, hour, day, week, or month. Keep the number of buckets reasonable for the time range.
"minute""hour""day""week""month"Lists the site's goals.
siteIdstring必填ID of the site (see List sites).
limitintegerMaximum number of results per page.
cursorstring | 任意 | nullOpaque pagination cursor from the previous response.
Creates a goal. A goal converts when an event, page view, session, or visitor matches its filter.
siteIdstring必填ID of the site (see List sites).
filterDslVersion1必填Filter language version. Always 1.
filterDslstring必填Filter expression that defines a conversion.
namestring必填Display name.
Returns one goal.
siteIdstring必填ID of the site (see List sites).
goalIdstring必填ID of the goal.
Updates a goal. Send only the fields to change.
siteIdstring必填ID of the site (see List sites).
goalIdstring必填ID of the goal.
filterDslVersion1filterDslstringnamestringDeletes a goal. Collected data is not affected.
siteIdstring必填ID of the site (see List sites).
goalIdstring必填ID of the goal.