GA4 and Meta events for online stores: the tracking setup we use

Ads can only optimize for what they can see, and you can only improve what you measure. Here's the tracking setup we put on online stores, and the mistakes it prevents.

Islam Mohamed Abdelaziz, founder of CTRL Solutions, on a video call from his laptop
Islam Mohamed Abdelaziz@islammohamedx

Tracking is the least exciting part of running a store, and one of the most expensive to get wrong. Meta's delivery system learns from the events your store sends. Google Analytics shows you the whole store, including visitors who didn't come from ads. If either one sees the wrong picture, every decision built on it is off.

Why you need both

  • Meta's events feed the ad algorithm. They decide who your ads are shown to next.
  • Google Analytics 4 shows the full site: every traffic source, including search, direct visits and other platforms, and what people do once they arrive.

The core events

Each event has a name in GA4 and an equivalent in Meta:

  • Product view: view_item in GA4, ViewContent in Meta.
  • Add to cart: add_to_cart and AddToCart.
  • Checkout or order form started: begin_checkout and InitiateCheckout.
  • Purchase: purchase and Purchase.

Every event should carry the value, the currency (EGP) and the product IDs. For stores with a catalog, those IDs should match the catalog's, so ads can show the right products to the right people.

Pixel and Conversions API, without double counting

The browser Pixel misses events when browsers block it or connections drop. The Conversions API sends the same events from the server. Send both, with the same event ID, and Meta counts each event once. I explain the setup for cash-on-delivery stores in Pixel and Conversions API for COD.

Add tracking parameters to every ad link, so GA4 knows which campaign and ad each visitor came from. Meta can fill some of them in automatically, such as the campaign name.

Check the values, not just the events

An event that fires with the wrong value is worse than no event, because the algorithm learns from it. In one perfume account we audited, the Pixel was reporting purchases at EGP 499 while the product sold at EGP 799. Another account reported more than EGP 1 billion in purchases from a broken value, which I wrote about in the account that reported EGP 1 billion.

The extra step for cash on delivery

In cash-on-delivery stores, a purchase event fires when the order is placed, not when it's paid. Some stores also send the purchase only after the order is confirmed, so the algorithm learns from serious buyers. Either way, keep your own record of confirmed and delivered orders, as I explain in CPA, ROAS and delivered orders.

Test before you spend

  • Use Meta's Test Events in Events Manager and GA4's DebugView while you browse the store.
  • Place a real test order and check that one purchase arrives in each, with the right value.
  • Compare every week: purchases in Ads Manager should roughly match the store's own orders. A big gap means something broke.

And for search traffic, add the site to Google Search Console, which I cover in bilingual websites that rank.

If you're not sure your store is tracking correctly, message me on WhatsApp with your store link. I'll tell you what I'd check first.

Ready to take control?

Send us your brand name and what you need. We'll take it from there.

Start a project
Chat with us on WhatsApp