Analyze goals
GET https://datafa.st/api/v1/analytics/goals
Return custom goal completions and unique visitors per goal name. Use this to rank which actions visitors take most often and compare goal performance across date ranges or audience segments.
When you request
fields=name, the response key is goal (not name). Payment and subscription lifecycle goals are excluded — this endpoint covers custom goals only.Related: Custom goals · Journey tracking
Request
Query parameters
fieldsname, completions, visitors. Requesting name returns the field as goal. Example: fields=name,completions,visitors.websiteIddft_ account token on Website API routes. Omit with a df_ website key. Example: ?websiteId=665f0b3c4d2e1a0012345678.startAtYYYY-MM-DD for calendar days or an ISO timestamp. Must be provided together with endAt. Example: startAt=2026-05-01.endAtstartAt. Example: endAt=2026-05-21.timezone"America/New_York", "Europe/Paris", "UTC". Defaults to the website timezone when omitted.limit100, maximum 1000 on analytics endpoints and 250 on list visitors. Example: limit=50.offsetlimit for pagination. Default 0. Example: offset=50.filter_countryis, is_not. Accepts country names or codes. Example: filter_country=US,Canada or filter_country=is_not:France.filter_regionfilter_region=California.filter_cityfilter_city=San Francisco.filter_devicedesktop, mobile, or tablet. Example: filter_device=mobile.filter_browserSafari also includes Mobile Safari. Example: filter_browser=Chrome,Safari.filter_osfilter_os=iOS,Android.filter_referrerGoogle or Direct/None. Example: filter_referrer=Google.filter_pageis, is_not, contains, does_not_contain. Example: filter_page=contains:/docs.filter_entry_pagefilter_page. Example: filter_entry_page=/pricing.filter_hostnamefilter_hostname=app.example.com.filter_goalfilter_goal=signup.filter_utm_sourcefilter_utm_source=google.filter_utm_mediumfilter_utm_medium=cpc.filter_utm_campaignfilter_utm_campaign=launch.filter_utm_termfilter_utm_term=brand-keyword.filter_utm_contentfilter_utm_content=hero-cta.filter_refref URL parameter. Example: filter_ref=twitter.filter_sourcesource URL parameter. Example: filter_source=newsletter.filter_viavia URL parameter. Example: filter_via=partner.Example filters
Combine
filter_* query params with date ranges:GET /api/v1/analytics/timeseries?fields=visitors,revenue&interval=day&startAt=2026-05-01&endAt=2026-05-21&filter_device=mobile&filter_country=US
Response
Returns a JSON object with
status: "success" and endpoint-specific fields in data (and pagination when the endpoint is paginated).Response fields
data[].goalsignup or checkout_started.data[].completionsdata[].visitorspagination.limitoffset to paginate through long result sets.pagination.offsetlimit for pagination.pagination.totalAuthentication
df_website API key: The website is inferred from the key. You do not need awebsiteIdquery parameter.dft_account token: Requiresanalytics:readpermission and?websiteId=on every request. The token must be allowed to access that website.
Read authentication and scopes for token creation, permission lists, and scoped tokens.
Errors
400 — Invalid
fields value or partial date range.404 — Website not found.
See API errors for the standard error envelope, auth failures, validation errors, permission errors, and rate limits.