Meta / Facebook · Web Pixels API replacement · confidence: high
Dies 2026-08-26
// This pattern covers stores where server-side Conversions API (CAPI) is
// already wired up correctly, but the BROWSER-side event_id used for
// deduplication was generated inside checkout.liquid — that generator dies
// Aug 26. CAPI itself (your server -> Meta call) is unaffected; only the
// client-side half of the dedup pair needs to move.
analytics.subscribe('checkout_completed', (event) => {
const { checkout } = event.data;
if (!checkout) return;
// checkout.token is a stable, unique identifier for this checkout — use it
// as the shared event_id on BOTH the browser pixel call and your existing
// server-side CAPI call for the same order, exactly as the old
// checkout.liquid-generated ID was used.
fetch(`https://graph.facebook.com/v20.0/PIXEL_ID/events?access_token=ACCESS_TOKEN`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
keepalive: true,
body: JSON.stringify({
data: [{
event_name: 'Purchase',
event_time: Math.floor(Date.now() / 1000),
event_id: checkout.token,
action_source: 'website',
custom_data: {
value: checkout.totalPrice ? checkout.totalPrice.amount : undefined,
currency: checkout.totalPrice ? checkout.totalPrice.currencyCode : undefined,
order_id: checkout.order ? checkout.order.id : undefined,
},
}],
}),
});
// Your existing order-webhook-triggered server-side CAPI call must be
// updated to pass this SAME checkout.token (or the resulting order ID) as
// its event_id — that is the change needed on the server side, no code
// shown here since it lives in your own backend, not the pixel.
});What this does NOT cover
This does NOT cover CAPI payload fields sourced from Additional Scripts (e.g. a custom customer match key set there) — audit your server-side payload builder separately.
Meta / Facebook family · Meta Pixel + Meta CAPI + Meta Ads post-purchase — Aug 26 breakage is same across all.