Analytics
Record usage analytics events for your user.
Access it as client.analytics on a Strongly client, or the same path on AsyncStrongly with await. All methods exist on both with identical signatures.
Methods
All methods
beacon
beacon(*, events: Sequence[Mapping[str, Any]]) -> int
Record a batch of usage events, stamped with your user and organization.
Parameters
events(Sequence[Mapping[str, Any]]): 1 to 100 events, each with the keys the platform records:eventType,route,referrerRoute,dwellTimeMs,featureName,action,component,lcpMs,fidMs,cls,genAiSystem,genAiModel,genAiTokensInput,genAiTokensOutput,traceId,spanIdandtimestamp(ISO 8601; the API's default is the time it receives the event). Other keys are ignored.
Returns
int: How many events were recorded.
Raises
ValidationError: No events, or more than 100.