Developer Methods
User Identification
Use the identify method to link the Apptrove session to a specific user in your system. This is typically called after a successful login or registration.
// Bind a unique Customer User ID (CUID)
window.AT("pwa", "identify", {
cuid: "USER_UNIQUE_ID", // Required
mode: "testing" // Optional: "live" (default) | "testing"
});
Event Tracking
Track specific conversion milestones (e.g., Add to Cart, Subscription, or Level Up) using the trackEvent method.
window.AT("pwa", "trackEvent", {
id: "tGlfZsqwRJ", // Required: The event slug defined in your dashboard
revenue: "499.00", // Optional: Transaction value
currency: "USD", // Optional: ISO 4217 currency code
order_id: "TXN_98765", // Optional: Your internal transaction ID
event_values: {}, // Optional: Key-value map of extra event data
param1: "Silver_Tier", // Optional: Custom attribute
param2: "Yearly_Plan", // Optional: Custom attribute
mode: "testing" // Optional: "live" (default) | "testing"
});
note
mode lets you send test events (e.g. while QA-ing an integration) without mixing them into live reporting. Omit it to send as live.
Each identify / trackEvent call needs its own mode — it is not inherited from the site-wide mode set in the Implementation Script. That install-time setting only affects the automatic page-visit beacon.
Events Dashboard — Apptrove:
