e_g Playbook For Ecommerce
A canonical ecommerce event model for stores that need to route the same customer journey into Meta, Google Ads, TikTok, GA4, and custom systems.
How this playbook should be modeled.
Use a small set of canonical events and keep the payload rich. Ecommerce wins when the gateway sees product IDs, value, currency, quantity, and checkout progression clearly.
Recommended canonical events.
These are the main e_g events this funnel should emit consistently.
Example e_g calls.
Use this as a starting point, then enrich payloads with your own business identifiers.
window.e_g("ViewContent", {
ecommerce: {
value: 99.99,
currency: "USD"
},
properties: {
content_ids: ["SKU-123"],
content_type: "product",
content_name: "Blue Running Shoe"
}
});
window.e_g("AddToCart", {
ecommerce: {
value: 99.99,
currency: "USD"
},
properties: {
content_ids: ["SKU-123"],
content_type: "product",
quantity: 1
}
});
window.e_g("Purchase", {
ecommerce: {
order_id: "ORDER-1001",
value: 149.99,
currency: "USD"
},
properties: {
content_ids: ["SKU-123", "SKU-999"],
contents: [
{ id: "SKU-123", quantity: 1, item_price: 99.99 },
{ id: "SKU-999", quantity: 1, item_price: 50.0 }
],
num_items: 2,
content_type: "product"
}
});What to keep consistent.
These habits reduce platform mismatch and make downstream routing simpler.
Recommendation
Always send order_id, value, and currency for purchases.
Recommendation
Use content_ids consistently across product view, cart, checkout, and purchase.
Recommendation
Keep item IDs aligned with catalog IDs used downstream.