All articles

Conversions API on Gomag, WooCommerce and Shopify: a step-by-step guide

How to turn on Meta Conversions API, TikTok Events API and GA4 Measurement Protocol on Gomag, WooCommerce and Shopify, step by step, with links to the documentation.

· Echipa Aopy

You put the Meta pixel in your store two years ago and have not touched it since. In the meantime, Ads Manager shows fewer orders than your store's admin, and your agency tells you to "set up Conversions API". It is done differently on each store platform, and on some of them you send only the order from the server, not the rest of the events.

This guide is the practical part. What server-side tracking is, how deduplication works and why consent stays mandatory you will find in the article on server-side tracking. Here we go through, platform by platform, what you set up and where.

What you need, whatever the platform

Three APIs, each with its own access details:

  • Meta Conversions API: the pixel (dataset) ID and an access token generated in Events Manager. You use the same pixel ID for the browser events and the server events (Meta, get started).
  • TikTok Events API: the pixel code and an access token, from TikTok Events Manager.
  • GA4 Measurement Protocol: the measurement ID (G-...) and an API secret, created in the data stream settings in GA4. The API secret is never put in browser code (Google, sending events).

And one rule for all three: if you send the same order both from the browser and from the server, both events have the same ID and the same name. Meta compares the ID and the event name and keeps only one, if they arrive within 48 hours (Meta, deduplication). TikTok asks for the same event_id on the pixel and on the Events API, also within a 48-hour window (TikTok, deduplication).

Shopify

On Shopify, the server side is handled by the official apps of the ad platforms. You write no code.

Meta

  1. Install the Facebook & Instagram app from Shopify and connect the Business account and the pixel.
  2. For customer data sharing, choose the Maximum level. At this level, Shopify uses the pixel and Conversions API together, and the purchase event goes from Shopify's servers straight to Meta (Shopify, data sharing with Meta).
  3. Open Events Manager, the test tab, and place a test order. The event must appear from both sources, browser and server.

TikTok

  1. Install the TikTok app from Shopify and connect the TikTok for Business account.
  2. Choose the data sharing level. Standard means only the browser pixel. Enhanced adds Events API and advanced matching. Maximum also adds the data sent through Shopify's APIs (TikTok, data levels on Shopify).
  3. For Events API, choose Enhanced or Maximum.

GA4

The Google & YouTube app connects the GA4 property and puts the Google tag in the store. We found no mention in the official documentation that it also sends events through Measurement Protocol. For server-side GA4 on Shopify you need a separate app or your own integration.

WooCommerce

On WooCommerce you work with plugins. You install them from WordPress, under Plugins.

Meta

  1. Install Meta for WooCommerce (formerly Facebook for WooCommerce) and connect the Business account and the pixel.
  2. Conversions API is built into the plugin and needs no extra setting, according to the WooCommerce documentation. Pixel events and Conversions API events are deduplicated by a unique ID (WooCommerce, Meta for WooCommerce).
  3. If you have a cache plugin that bundles JavaScript files, check in Events Manager that the browser events are really going out. The plugin's documentation warns that such a plugin can stop them.

TikTok

  1. Install the TikTok plugin for WooCommerce and connect the TikTok for Business account.
  2. The plugin page asks you to enable Events API to track traffic (the TikTok plugin on WordPress.org).
  3. Check the events in TikTok Events Manager, after a test order.

GA4

Google for WooCommerce and Google Analytics for WooCommerce put the GA4 tag in the store and track e-commerce events (Google Analytics for WooCommerce). Their pages do not say they send events through Measurement Protocol. For server-side GA4 you need another solution.

Gomag

On Gomag, pixels are added from the apps in the store, under Gomag Apps.

Meta

  1. Add the Meta pixel from the Meta Pixel app in Gomag.
  2. For Conversions API: in Events Manager, under Settings, go to the direct integration section and click "Generate access token". Copy the token.
  3. In the Meta Pixel app in Gomag, paste the token into the Conversions API – Access Token field and save.

Note: according to the Gomag help center, Conversions API records only Purchase events. View Content, Add To Cart, Search or Initiate Checkout do not go from the server (Gomag, Meta Pixel).

TikTok

  1. In TikTok Events Manager, you create a web pixel with manual installation. TikTok recommends the "TikTok Pixel + Events API" connection method.
  2. You copy the pixel code and paste it in Gomag Apps > Affiliate marketing > TikTok, in the Pixel Code field (Gomag, TikTok).

The Gomag article describes installing the pixel. It does not say that Gomag sends events through Events API from the server.

GA4

In the Google Analytics app in Gomag you choose Google Analytics 4 and paste the measurement ID. You also choose whether to send the IP address and whether to send the order ID or the order number with orders (Gomag, Google Analytics). There is no Measurement Protocol setting.

How to check that it works

  1. Meta: in Events Manager, the test tab. The Purchase event appears from the browser and from the server, marked as deduplicated.
  2. TikTok: in Events Manager, you check the source of the events and the parameters received.
  3. GA4: in DebugView or in the real-time report. Measurement Protocol is made to complement browser collection, not replace it, and server events are tied to the visit through client_id (Google, Measurement Protocol).
  4. Comparison with the store: for a few days in a row, put the orders from the admin next to those from each platform. They will not be equal, but the gap must shrink.

The mistakes that break your numbers

  • Two sources send the same order from the server. For example, the official app and another plugin or an external service. If they do not use the same ID, the platform counts the order twice.
  • The event name differs. Purchase from the browser and purchase from the server are not deduplicated at Meta.
  • The ID differs. The browser sends the order number, the server sends the internal ID. Pick one and use it everywhere.
  • You send without consent. The server event follows the same rules as the pixel. If the visitor refused, their data does not go out.
  • You leave the test code active. The code from the Events Manager test tab is removed after checking.

How Aopy handles the server side

Aopy is built by the team behind Clinica de Marketing, which has worked in e-commerce since 2016. We built server-side tracking to work the same way on all the platforms we cover: Meta, TikTok and GA4.

  • Where orders come from: on Shopify, WooCommerce and MerchantPro, from the notifications the store sends on each order. On Gomag, Aopy reads orders through the Gomag API. Platform pages: Gomag, WooCommerce, Shopify.
  • What you connect: the Meta account and the TikTok account, with login, and you choose the pixel from the account. For GA4 you paste the measurement ID and the API secret.
  • What it sends: the order, as Purchase to Meta, as a purchase to TikTok and as purchase to GA4. Refunds go to GA4 as refund.
  • Deduplication: the server event has the order number as its ID. The platform deduplicates it if the browser event uses the same ID.
  • Personal data: email, phone and name go out hashed with SHA-256. Without the visitor's consent, for marketing at Meta and TikTok and for analytics at GA4, Aopy does not send the event.
  • No duplicates on Shopify: if the Facebook & Instagram app already sends the events to Meta, Aopy does not send them as well.

You do not need a Google Tag Manager server: events go straight from Aopy. The plans are on the pricing page.