"Best analytics tool I've used in 14 years"

Get visitor

GET https://datafa.st/api/v1/visitors/{visitorId}

Retrieve identity, activity, profile, completed goals, payment, and prediction data for one visitor.

Request

Authentication

  • df_ website API key for one website.
  • dft_ account token with analytics:read. Pass websiteId as a query parameter.

Path parameters

ParameterTypeDescription
visitorIdstringAlias for datafast_visitor_id on endpoints that accept both names. Visitor UUID returned by list visitors or stored in the visitor cookie.

Response

Returns a JSON object with status and endpoint-specific fields.

Response fields

FieldTypeDescription
data.visitorIdstringAlias for datafast_visitor_id on endpoints that accept both names.
data.identityobjectLocation, browser, operating system, device, viewport, and first-session parameters known for the visitor. Location, browser, OS, device, viewport, params, and ad click IDs.
data.identity.countrystringnull
data.identity.countryCodestringnull
data.identity.regionstringnull
data.identity.citystringnull
data.identity.paramsobjectURL parameters captured on the first session, such as ref, source, via, and UTM fields.
data.identity.adClickIdsobjectCaptured ad click IDs such as Google or Meta click identifiers.
data.identity.browserobjectBrowser details.
data.identity.browser.namestringnull
data.identity.browser.versionstringnull
data.identity.osobjectOperating system details.
data.identity.os.namestringnull
data.identity.os.versionstringnull
data.identity.deviceobjectDevice details.
data.identity.device.typestringnull
data.identity.device.vendorstringnull
data.identity.device.modelstringnull
data.identity.viewportobjectViewport dimensions captured from the pageview.
data.identity.viewport.widthnumbernull
data.identity.viewport.heightnumbernull
data.activity.visitCountnumberNumber of visits.
data.activity.pageViewCountnumberNumber of pageviews.
data.activity.timeSinceFirstVisitnumberMilliseconds since this visitor's first known visit.
data.activity.timeSinceCurrentVisitnumberMilliseconds since this visitor's current/latest visit started.
data.activity.firstVisitAtstringnull
data.activity.lastVisitAtstringnull
data.activity.currentUrlstringnull
data.activity.completedGoalsobject[]Custom, payment, free trial, and subscription lifecycle goals.
data.activity.completedGoals.namestringHuman-readable name for the resource or event. The exact meaning depends on the endpoint.
data.activity.completedGoals.originstringmanual for custom goals or payment_provider for provider events.
data.activity.completedGoals.typestringGoal type such as custom, payment, or subscription_lifecycle.
data.activity.completedGoals.timestampstringEvent timestamp. Use it when recording historical events; defaults to the request time.
data.activity.visitedPagesobject[]Visited page timeline.
data.activity.visitedPages.urlstringVisited page URL or path.
data.activity.visitedPages.timestampstringEvent timestamp. Use it when recording historical events; defaults to the request time.
data.profileobjectnull
data.profile.userIdstringYour user ID passed to Identify.
data.profile.metadataobjectCustom metadata stored with the event or profile. Use this to enrich reporting and visitor profiles.
data.profile.identifiedAtstringTimestamp when this profile was created or updated.
data.predictionobjectnull
data.prediction.scorenumber0-100 lead score. Higher means the visitor is more likely to convert.
data.prediction.conversionRatenumberPredicted conversion rate for this visitor.
data.prediction.expectedValuenumberPredicted revenue value in USD.
data.prediction.confidencenumber0-1 confidence score for the prediction.

Errors

Common errors include 400 for invalid input, 401 for missing or invalid tokens, 403 for missing permission or suspended tracking, 404 for missing resources, and 500 for server errors.

✍️ Something missing? Suggest features.

🤖 AI agent or LLM? Read this page as markdown

Example request
curl -X GET "https://datafa.st/api/v1/visitors/{visitorId}" \
  -H "Authorization: Bearer df_xxx"
Success response
{
  "status": "success",
  "data": {
    "visitorId": "a3ab2331-989f-4cfa-91c6-2461c9e3c6bd",
    "identity": {
      "country": "US",
      "browser": { "name": "Chrome" },
      "device": { "type": "desktop" }
    },
    "activity": {
      "visitCount": 3,
      "pageViewCount": 8,
      "completedGoals": [],
      "visitedPages": []
    },
    "profile": {
      "userId": "user_123",
      "metadata": { "plan": "pro" },
      "identifiedAt": "2026-05-21T00:00:00.000Z"
    },
    "prediction": {
      "score": 72,
      "conversionRate": 0.0138,
      "expectedValue": 3.09,
      "confidence": 0.831
    }
  }
}