Events
Entity:Action Model
Section titled “Entity:Action Model”Junction uses a structured event model where every event has an entity and an action:
jct.track("product", "viewed", { product_id: "SKU-123" });// ^^^^^^ ^^^^^^// entity actionThis is different from flat event strings like view_item or addToCart. The entity:action model gives you:
- Consistent naming — events are always
entity:action, never ambiguous - Schema validation — define contracts per entity+action pair
- Destination mapping — each destination translates to its own naming convention
Common Events
Section titled “Common Events”| Entity | Action | Description |
|---|---|---|
page | viewed | Page view |
product | viewed | Product detail view |
product | added | Added to cart |
order | completed | Purchase completed |
form | submitted | Form submission |
cta | clicked | Call-to-action click |
Properties
Section titled “Properties”The third argument to track() is a properties object. Properties are passed to destinations after transformation:
jct.track("product", "viewed", { product_id: "SKU-123", name: "Junction T-Shirt", price: 29.99, currency: "USD", category: "Apparel",});System Events
Section titled “System Events”The _system entity is reserved for internal lifecycle events (initialization, consent changes, errors). Destinations automatically filter system events — you don’t need to handle them.
Identity
Section titled “Identity”Use identify() to associate events with a user:
jct.identify("user-123", { email: "user@example.com", plan: "pro",});Anonymous IDs are generated automatically and persist across sessions via localStorage.