API reference / Analytics
List goals
Every goal that visitors completed in the period (sign-ups, checkouts and any other goal that the site sends), most visitors first. Each goal has its conversion rate and how it shows on the dashboard.
/api/v1/analytics/goalsOther ways to call it
troopy analytics goals listtroopy_list_analytics_goalsQuery parameters
periodenum<string>now is the last 10 minutes. 7d and 30d end today. 3m, 6m and 12m are whole months that end with this month. week starts on Monday. custom needs from and to
nowtodayyesterday24h7d30d3m6m12mweekmonthyearallcustom
Default "30d"
fromstringYYYY-MM-DD, in the workspace's time zone
date
tostringYYYY-MM-DD. The period includes this day
date
compareenum<string>Also gives another window: previous is the window just before, with the same length. year is the same days a year before. custom is compare_from to compare_to
previousyearcustom
compare_fromstringWith compare custom: the first day of the other window
date
compare_tostringWith compare custom: the last day of the other window
date
filter_channelstringchannel: op:value[,value]. The op is is, is_not, contains, does_not_contain, matches (a regular expression) or does_not_match. No op means is. More values mean any of them. (none) matches an empty value, as for direct traffic
At most 500 characters
filter_referrerstringreferrer: op:value[,value]. The op is is, is_not, contains, does_not_contain, matches (a regular expression) or does_not_match. No op means is. More values mean any of them. (none) matches an empty value, as for direct traffic
At most 500 characters
filter_utm_sourcestringutm source: op:value[,value]. The op is is, is_not, contains, does_not_contain, matches (a regular expression) or does_not_match. No op means is. More values mean any of them. (none) matches an empty value, as for direct traffic
At most 500 characters
filter_utm_mediumstringutm medium: op:value[,value]. The op is is, is_not, contains, does_not_contain, matches (a regular expression) or does_not_match. No op means is. More values mean any of them. (none) matches an empty value, as for direct traffic
At most 500 characters
filter_utm_campaignstringutm campaign: op:value[,value]. The op is is, is_not, contains, does_not_contain, matches (a regular expression) or does_not_match. No op means is. More values mean any of them. (none) matches an empty value, as for direct traffic
At most 500 characters
filter_utm_termstringutm term: op:value[,value]. The op is is, is_not, contains, does_not_contain, matches (a regular expression) or does_not_match. No op means is. More values mean any of them. (none) matches an empty value, as for direct traffic
At most 500 characters
filter_utm_contentstringutm content: op:value[,value]. The op is is, is_not, contains, does_not_contain, matches (a regular expression) or does_not_match. No op means is. More values mean any of them. (none) matches an empty value, as for direct traffic
At most 500 characters
filter_refstringref: op:value[,value]. The op is is, is_not, contains, does_not_contain, matches (a regular expression) or does_not_match. No op means is. More values mean any of them. (none) matches an empty value, as for direct traffic
At most 500 characters
filter_sourcestringsource: op:value[,value]. The op is is, is_not, contains, does_not_contain, matches (a regular expression) or does_not_match. No op means is. More values mean any of them. (none) matches an empty value, as for direct traffic
At most 500 characters
filter_viastringvia: op:value[,value]. The op is is, is_not, contains, does_not_contain, matches (a regular expression) or does_not_match. No op means is. More values mean any of them. (none) matches an empty value, as for direct traffic
At most 500 characters
filter_pagestringpage: op:value[,value]. The op is is, is_not, contains, does_not_contain, matches (a regular expression) or does_not_match. No op means is. More values mean any of them. (none) matches an empty value, as for direct traffic
At most 500 characters
filter_entry_pagestringentry page: op:value[,value]. The op is is, is_not, contains, does_not_contain, matches (a regular expression) or does_not_match. No op means is. More values mean any of them. (none) matches an empty value, as for direct traffic
At most 500 characters
filter_exit_pagestringexit page: op:value[,value]. The op is is, is_not, contains, does_not_contain, matches (a regular expression) or does_not_match. No op means is. More values mean any of them. (none) matches an empty value, as for direct traffic
At most 500 characters
filter_hostnamestringhostname: op:value[,value]. The op is is, is_not, contains, does_not_contain, matches (a regular expression) or does_not_match. No op means is. More values mean any of them. (none) matches an empty value, as for direct traffic
At most 500 characters
filter_countrystringcountry: op:value[,value]. The op is is, is_not, contains, does_not_contain, matches (a regular expression) or does_not_match. No op means is. More values mean any of them. (none) matches an empty value, as for direct traffic
At most 500 characters
filter_regionstringregion: op:value[,value]. The op is is, is_not, contains, does_not_contain, matches (a regular expression) or does_not_match. No op means is. More values mean any of them. (none) matches an empty value, as for direct traffic
At most 500 characters
filter_citystringcity: op:value[,value]. The op is is, is_not, contains, does_not_contain, matches (a regular expression) or does_not_match. No op means is. More values mean any of them. (none) matches an empty value, as for direct traffic
At most 500 characters
filter_languagestringlanguage: op:value[,value]. The op is is, is_not, contains, does_not_contain, matches (a regular expression) or does_not_match. No op means is. More values mean any of them. (none) matches an empty value, as for direct traffic
At most 500 characters
filter_browserstringbrowser: op:value[,value]. The op is is, is_not, contains, does_not_contain, matches (a regular expression) or does_not_match. No op means is. More values mean any of them. (none) matches an empty value, as for direct traffic
At most 500 characters
filter_osstringos: op:value[,value]. The op is is, is_not, contains, does_not_contain, matches (a regular expression) or does_not_match. No op means is. More values mean any of them. (none) matches an empty value, as for direct traffic
At most 500 characters
filter_devicestringdevice: op:value[,value]. The op is is, is_not, contains, does_not_contain, matches (a regular expression) or does_not_match. No op means is. More values mean any of them. (none) matches an empty value, as for direct traffic
At most 500 characters
filter_screenstringscreen: op:value[,value]. The op is is, is_not, contains, does_not_contain, matches (a regular expression) or does_not_match. No op means is. More values mean any of them. (none) matches an empty value, as for direct traffic
At most 500 characters
filter_goalstringgoal: op:value[,value]. The op is is, is_not, contains, does_not_contain, matches (a regular expression) or does_not_match. No op means is. More values mean any of them. (none) matches an empty value, as for direct traffic
At most 500 characters
filter_propertystringVisitors who sent a goal with a property: op:name=value[,name=value], such as is:plan=pro. The op is one of is, is_not, contains, does_not_contain, matches and does_not_match
At most 500 characters
filter_visit_countstringSessions by the visitor's visit number: is:1 (new), gte:2 (returning), lte, is_not
At most 500 characters
Response
200 · application/jsondata*object3 properties
visitors*integerThe period's visitors
goals*array<object>9 properties
name*stringcompletions*integervisitors*integerconversionRate*numberShare of the period's visitors who completed it, 0 to 1
label*string | nullThe dashboard shows it instead of the name
color*enum<string> | nullstoneskymintsandrosepeachcyanorange
description*string | nullhidden*booleanThe dashboard does not show it. Its events stay
page*string | nullA page goal: each view of a page that matches this path counts as the goal. * matches within one part of the path, ** matches across parts
series*objectThe 8 busiest goals that aren't hidden, over time
2 properties
buckets*array<string>The period's buckets, by its interval
goals*array<object>2 properties
name*stringcounts*array<integer>Completions in each bucket