page.view
Initial page load and SPA route changes.
window.sarge("track", "page.view", {
path: window.location.pathname,
title: document.title
}); Use stable, lowercase, dot-separated names. Properties should be JSON-serializable and should keep the same shape every time an event fires.
The listed fields are the recommended tracking contract. Ingestion accepts other non-empty names; diagnostics flags missing properties for supported event types. Keep credentials and personal information out of event payloads, URLs, titles, and user IDs.
Initial page load and SPA route changes.
window.sarge("track", "page.view", {
path: window.location.pathname,
title: document.title
}); Product detail view, quick view, or product card inspection.
window.sarge("track", "product.viewed", {
product_id: "field-flask",
product_name: "Field Flask",
price: 42,
currency: "USD"
}); A product is successfully added to cart.
window.sarge("track", "cart.added", {
product_id: "field-flask",
product_name: "Field Flask",
price: 42,
currency: "USD",
cart_size: 1
}); The customer starts checkout.
window.sarge("track", "checkout.started", {
value: 84,
currency: "USD",
cart_size: 2
}); Payment succeeds and an order is created.
window.sarge("track", "purchase.completed", {
order_id: "order_123",
value: 84,
currency: "USD",
item_count: 2,
products: ["field-flask", "map-wax"]
}); These are emitted automatically when Sarge observes common third-party marketing APIs after the pixel loads. Server-side vendor calls can use the same event names with `transport: "server"`, an `upstream` response summary, and an optional `implementation.note` for AI reviewer context.
Observed from `fbq(...)`, or reported by a server Meta API call.
{
vendor: "meta",
command: "track",
event_name: "Purchase",
payload: { value: 84, currency: "USD" }
} Observed from `gtag(...)`, or reported by a server Google API call.
{
vendor: "google",
command: "event",
event_name: "purchase",
payload: { transaction_id: "order_123", value: 84 }
} Observed from `dataLayer.push(...)`
{
vendor: "google",
payload: {
event: "purchase",
ecommerce: { value: 84, currency: "USD" }
}
}