Tracking Data
In the Flagship SDK
, a Hit is a user interaction with your application that is tracked and sent to the Flagship server whenever a user performs a specific action or reaches a certain point in your application.
The SDK does not directly send hits as they are emitted. It uses the tracking manager, which is a mechanism that sends them to Flagship by batch through HTTPS. The tracking manager's batch processing reduces network traffic, prevents hits loss through caching, and resends any failed hits.
There are five different types of Hits, each corresponding to a specific KPI: Page
, Screen
, Transaction]
, Item
, and Event
. For additional details, refer to your specific SDK reference documentation.
The sendHit
method of the visitor instance is used to send these hits to the Flagship server.
Below are examples in different programming environments:
import { HitType, EventCategory } from "@flagship.io/js-sdk";
// ... other code
visitor.sendHit({
type: HitType.EVENT,
category: EventCategory.USER_ENGAGEMENT,
action: "click",
label: "label",
value: 100,
});
Please consult the reference documentation for your specific SDK for more detailed information:
Last updated
Was this helpful?