Analytics
Visitors
Track unique visitor reach, new vs returning visitor ratios, geographic distribution, and device categories.
Overview
The Visitors report tracks audience volume and retention across your web properties, differentiating between first-time visitors and returning users who rely on the assistant for ongoing workflows.
Unique vs Returning Visitor Logic
- Unique Visitor: A unique browser instance identified by an anonymous cryptographic hash stored in
localStorage. Two visits from the same browser within a 24-hour UTC window count as a single daily unique visitor.
- Returning Visitor: A visitor whose identifier was created in a previous calendar day and returns to initiate a new session.
- Identified User: A visitor who signed into your application and was linked via
Asiyst.identify({ userId }).
Visitor Segmentation Metrics
| Metric | Calculation | Purpose |
|---|---|---|
| Total Visitors | Count of all distinct visitor IDs in period | Overall audience scale |
| New Visitor Ratio | (New Visitors / Total Visitors) * 100 | Top-of-funnel acquisition velocity |
| Returning Visitor Ratio | (Returning Visitors / Total Visitors) * 100 | Product stickiness and recurring usage |
| Device Distribution | Desktop vs Mobile vs Tablet percentages | Optimize avatar screen placement |
| Top Countries / Regions | GeoIP location breakdown | Target localized translations |
Querying Visitor Data via API
Retrieve visitor metrics over a custom date range using the REST API:
curl -G "https://asiyst.com/api/v1/projects/proj_9f8a2b3c4d/analytics/visitors" \
-H "Authorization: Bearer $ASIYST_API_TOKEN" \
--data-urlencode "from=2026-09-01T00:00:00Z" \
--data-urlencode "to=2026-09-28T00:00:00Z" \
--data-urlencode "interval=day"
Example JSON Response:
{
"summary": {
"totalVisitors": 42180,
"uniqueNew": 31200,
"uniqueReturning": 10980,
"returningRate": 0.26
},
"series": [
{ "date": "2026-09-27", "new": 1120, "returning": 410 },
{ "date": "2026-09-28", "new": 1340, "returning": 490 }
]
}
Retention & Cohort Analysis
The dashboard calculates 7-day, 14-day, and 30-day visitor retention curves. High 30-day retention indicates visitors find the embedded assistant valuable as an on-demand guide throughout their user journey.