User Analytics
Get User Activity
Get per-user activity metrics from data_tags.
Migration Note:
- Previously computed in frontend by fetching all users and parsing data_tags
- Now calculated in PostgreSQL for performance and consistency
- Matches frontend logic exactly
Metrics Per User:
- total_events: Total count of all events in data_tags
- characters_count: Count of CREATECHARACTER events
- stories_count: Count of CREATESTORY events
- watches_count: Count of WATCH events
- inferred_count: Count of events with invalid/missing timestamps
- last_active: Most recent valid timestamp (NULL if none)
Timestamp Parsing:
- Legacy format: EVENTTYPE_timestamp or EVENTTYPE_uuid_timestamp
- New format: EVENTTYPE|ISO8601 or EVENTTYPE_uuid|ISO8601
- Ignores timestamp=0 and invalid formats
Inferred Events:
- Events without valid timestamps
- Events with timestamp=0
- Malformed event tags
Use Cases:
- User engagement analysis
- Identify most active users
- Track content creation patterns
- Monitor data quality (inferred count)
Returns: Array of per-user activity: [ { "user_id": "123e4567-e89b-12d3-a456-426614174000", "total_events": 245, "characters_count": 12, "stories_count": 34, "watches_count": 156, "inferred_count": 3, "last_active": "2026-02-10T15:32:41.123000" }, ... ]
get/api/analytics/user-activity
Request
- Base URL: https://api.pixleyai.com (the document declares no server; this is the origin it was published from)
- URL: https://api.pixleyai.com/api/analytics/user-activity
- Auth: none declared
Response
Successful Response
unknown required
Changes
No recorded changes to this operation across all 1 revision of this API.