Urgent.News

What's breaking now, across thousands of outlets.

Tech

Shopify + Meta CAPI: Deduplicating Pixel and Server Events

Here's a ticket that shows up on every store that adds the Conversions API (CAPI): "Meta now reports almost double our purchases. Last month it matched Shopify." Nothing is wrong with Meta. You sent each order twice, and Meta had no way to know they were the same order. This post covers how deduplication works, the fields that make it work, and a pattern for Shopify that survives retries, consent…

Meta deduplicates a browser event and a server event when they share both the same event_name and the same event_id. This matching happens within a limited time window, typically 48 hours, but it's important to check the current documentation. If either field is missed, Meta will count it as two separate purchases. To avoid this, generate the ID once using something both sides already know, such as the order id in the case of purchases.

For Shopify stores, add a custom pixel in Settings > Customer events > Add custom pixel. This custom pixel runs in a sandbox, allowing you to subscribe to Shopify's events instead of reading the page. Use the following event schema and cookie access when adding the custom pixel.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

The World's Most Analyzed Dataset (and the Custody Chain Nobody Maintained)

Hi Dev 👋 This was going to be for the DEV/Kaggle challenge , but it doesn't work on Kaggle because of constraints I only learned about while trying to do it.

  • Iris dataset is the most analyzed in data science.
  • Custody chain of iris dataset is inadequately maintained.
  • Author emphasizes authenticity and diligence in data analysis.

More from Tuesday 6 October →