Install
openclaw skills install datafast-analyticsQuery DataFast website analytics and visitor data via the DataFast API for metrics, time series, realtime stats, breakdowns, visitor details, and goal/payment management.
openclaw skills install datafast-analyticsUse this skill to call the DataFast API and summarize results for the user.
startAt and endAt together or neither (overview/timeseries support ranges).timezone, fields, interval, limit, offset, and any filter_* parameters.Authorization: Bearer $DATAFAST_API_KEY and Content-Type: application/json.curl and parse JSON.df_).mkdir -p ~/.config/datafast
echo "df_your_key_here" > ~/.config/datafast/api_key
All requests need:
DATAFAST_API_KEY=$(cat ~/.config/datafast/api_key)
curl ... \
-H "Authorization: Bearer $DATAFAST_API_KEY" \
-H "Content-Type: application/json"
If the user hasn't set up the API key, ask them to follow the setup steps above.
https://datafa.st/api/v1/
Use the full API reference at {baseDir}/references/datafast-api-docs.md for endpoint details, response fields, and examples.
GET /analytics/overviewstartAt, endAt, timezone, fields.GET /analytics/timeseriesfields, interval (hour/day/week/month), startAt, endAt, timezone, limit, offset.filter_* query params for segmentation.fields is required (e.g., fields=visitors,sessions).GET /analytics/realtimeGET /analytics/realtime/mapGET /analytics/devicesGET /analytics/pagesGET /analytics/campaignsGET /analytics/goalsGET /analytics/referrersGET /analytics/countriesGET /analytics/regionsGET /analytics/citiesGET /analytics/browsersGET /analytics/operating-systemsGET /analytics/hostnamesGET /visitors/{datafast_visitor_id}POST /goalsDELETE /goals (requires at least one filter or time range; confirm scope)POST /paymentsDELETE /payments (confirm scope)For DELETE /goals or DELETE /payments:
Use filter_* params for segmentation (e.g., filter_referrer=is:X).
Important: Filter values must match the exact names from breakdown endpoints. For example, X/Twitter is stored as "X" (not "x.com" or "twitter.com"). When in doubt, query the breakdown first:
curl ... "/analytics/referrers?limit=20"
Then use the exact referrer value in your filter.
DATAFAST_API_KEY=$(cat ~/.config/datafast/api_key)
curl -sS "https://datafa.st/api/v1/analytics/overview?startAt=2024-01-01&endAt=2024-01-31&timezone=UTC" \
-H "Authorization: Bearer $DATAFAST_API_KEY" \
-H "Content-Type: application/json"
DATAFAST_API_KEY=$(cat ~/.config/datafast/api_key)
curl -sS "https://datafa.st/api/v1/goals" \
-H "Authorization: Bearer $DATAFAST_API_KEY" \
-H "Content-Type: application/json" \
-d '{"datafast_visitor_id":"...","name":"newsletter_signup","metadata":{"email":"..."}}'
DATAFAST_API_KEY=$(cat ~/.config/datafast/api_key)
curl -sS -X DELETE "https://datafa.st/api/v1/goals?name=signup&startAt=2023-01-01T00:00:00Z&endAt=2023-01-31T23:59:59Z" \
-H "Authorization: Bearer $DATAFAST_API_KEY"
limit, offset, and total, and ask if the user wants the next page.