Pixel and Conversions API
Set up the Meta Pixel, the Conversions API (events from the server), Google Analytics 4 and Tag Manager. They run on the store and on landing pages.
On this page
With a Pixel, Facebook learns who viewed a product, added it to the bag and ordered. Your ads reach the right people and Ads Manager shows the sales. Everything is under Marketing › Pixel & analytics.
Who can change it
These codes run on every page of your store, so only the owner or an admin can change the Pixel ID, the access token, the test code, GA4 and Tag Manager. The same goes for a landing page’s own Pixel (Landing pages in Facebook ads). A manager sees the tab and can send a test event, but the fields are locked with the note “Only the owner or an admin can change…”.
Each change sends the owner an email (to a verified email address): what changed (old → new), who changed it and when. The access token itself is never in the email, only “added”, “replaced” or “removed”. Several changes within ten minutes come together in one email, and changes the owner makes in their own session are told at most once a day. If you didn’t expect the email, change it back and check staff roles.
An owner without a verified email gets a short SMS on their verified mobile number instead: what changed, who changed it and the link to check it. It’s free (it never uses your SMS credits), and at most one an hour comes for each kind of change (tracking, contact, payment numbers, staff), so open the setting to see everything that changed.
Store and landing page previews load no Pixel, GA4 or Tag Manager, so your own checks are never counted as visits.
Meta Pixel
- In Meta Events Manager, open your Pixel under Data sources and copy its Pixel ID (digits only).
- In the dashboard, open Marketing › Pixel & analytics.
- Paste it into Meta Pixel ID 1.
- Press Save. Within a minute the Pixel runs on the store and every landing page. The Pixel comes with the Conversions API as one plan feature (Facebook Pixel + Conversion API, on Starter, Growth and Pro). Without it in your plan (a smaller plan, or a trial or add-on that ended) the Pixel doesn’t load on the store or any landing page, not even a landing page’s own, and a new Pixel ID can’t be saved; the saved ID is kept and runs again the moment your plan has it.
The events it sends:
| Event | When |
|---|---|
| PageView | any page opens |
| ViewContent | a product page or landing page opens |
| AddToCart | something goes into the bag |
| InitiateCheckout | the shopper reaches checkout or starts typing in a landing page form |
| Purchase | an order is placed, with the amount (BDT) |
For a different Pixel on one landing page: Landing pages in Facebook ads. There is no TikTok or other pixel yet.

Conversions API
Ad blockers and iPhones often stop the browser Pixel, and then orders never reach Facebook. The Conversions API (CAPI) sends the same events from our server, so orders aren’t lost. It’s on Starter, Growth and Pro; on other plans the card says “This feature is not in your plan. Upgrade to turn it on.”
- In Events Manager, open the Pixel’s Settings, press Generate access token under Conversions API, and copy the token.
- In the dashboard, paste it into Access token 2 on the Conversions API (events from the server) card.
- Press Save token. Below the field it says “✓ A token is set”.
The token is stored encrypted and never shown again. To change it, paste a new one and save; to stop, press Remove token. CAPI needs the Pixel ID as well.
From the server we send Purchase (for every new order, including ones you take by hand), InitiateCheckout, ViewContent and AddToCart. The shopper’s phone, name, city and so on are hashed the way Meta asks, so Facebook can match the person.
Nothing is counted twice
The browser and the server send each event with the same event_id. Facebook matches the event_id and counts it once, so an order is never counted twice.
The card shows when the last event was sent and, if something went wrong, the last problem in red. If it mentions the token, make a new token and paste it in.
Test events
Check everything before your ads go live:
- In Events Manager open Test events and copy the code it gives (like
TEST12345). - Paste it into Test event code (optional) 3 and press Save in the first card (under Google Tag Manager ID); the test code saves with those fields.
- Press Send a test event (it shows once the Pixel ID and token are both saved).
- “Sent; check Events Manager → Test events” means a ViewContent event should appear in Events Manager.
- When you’re done, clear the code and press Save again.
Watch out
While a test code is set, every server event goes as a test and doesn’t count for real. Remember to clear it.
Google Analytics 4 and Tag Manager
- GA4 Measurement ID 4: starts with
G-(Google Analytics › Admin › Data streams). Along with page views it sends the ecommerce eventsview_item,add_to_cart,begin_checkoutandpurchase(with the order number and amount). - Google Tag Manager ID: starts with
GTM-. The same events are pushed to thedataLayer; build your own tags in Tag Manager.
Watch out
Any code you add through GTM runs on your customers’ pages. Add only tags you trust, and give access to your Tag Manager account only to people you trust.
Fill them in and press Save. They work on every plan. Clear a field and save to turn it off.
See also: Where orders come from · Landing pages in Facebook ads
