In this article · 17 sections
- What the Meta Pixel is and what it does
- Pixel vs Conversions API (CAPI): what is the difference
- What you need before you start
- How to add the Meta Pixel to your store, step by step
- How to check that events reach Meta
- Which events CloudCart sends to Meta and TikTok
- What data the Conversions API sends and what Event Match Quality is
- How to set up the TikTok Pixel and Events API
- Meta vs TikTok in CloudCart: the setup side by side
- The product catalog for Facebook, Instagram and TikTok
- Why Meta shows fewer purchases than your store
- Which numbers to watch once the pixel works
- How to pull the numbers from your store with Claude or another AI assistant
- Best practices for the pixel in your online store
- Pixel setup mistakes to avoid
- Other Facebook, Instagram and TikTok connections in CloudCart
- Frequently asked questions
In short: in CloudCart you switch on the Meta Pixel in Apps → XML Feed → Facebook → Settings by pasting the numeric Facebook Pixel ID, and the TikTok Pixel in Apps → TikTok Dynamic Ads → Settings with the Pixel Code. The store then sends 7 standard events on its own, from a product view to the purchase. The server-side connection (Conversions API for Meta, Events API for TikTok) also needs an Access Token.
This guide covers the technical setup only: where to get the codes, which fields to fill in, how to test and why Meta often shows fewer purchases than your store. Campaigns and budgets are in Meta Ads for an online store. Written by the CloudCart team, the Bulgarian ecommerce platform, for stores selling in or from Bulgaria and across the EU.
What the Meta Pixel is and what it does
The Meta Pixel (formerly the Facebook Pixel) is code in your store that tells Meta what a visitor does: views a product, searches, adds to cart, starts checkout and buys. Meta uses these events to show which Facebook or Instagram ad led to a sale, to build retargeting audiences and to steer delivery toward likely buyers (Meta Business Help: set up the Meta Pixel). The TikTok Pixel does the same for TikTok ads.
Without a pixel the ad platform sees only clicks and optimizes for cheap clicks instead of buyers. In CloudCart you do not paste JavaScript into your theme: you enter the pixel's ID, and the store places the code and sends events with the cart value, currency and products.
Pixel vs Conversions API (CAPI): what is the difference
The pixel sends events from the visitor's browser. The Conversions API (CAPI) sends the same events from the store's server straight to Meta, so the purchase still arrives when an ad blocker or iOS tracking limits stop the pixel (Meta Business Help: Conversions API).
In CloudCart both run side by side, and every event carries the same event_id in the browser and on the server, so Meta counts one purchase once. The purchase ID is calculated from the cart and its products, so a Purchase sent twice for the same cart still counts once.
| Pixel (browser) | Conversions API (server) | |
|---|---|---|
| What CloudCart needs | Facebook Pixel ID | Pixel ID + Access Token + Enable CAPI |
| Stopped by an ad blocker | Yes | No |
| Needs cookie consent | Yes, the Targeting group | Yes, the Targeting group |
| Availability in CloudCart | Every plan | Not included in the plans on /pricing |
On Pricing the row “Facebook Conversions API (CAPI)” is marked ✗ for Baby Pack, Starter Pack, CC Pro and CC Master, and the app labels it a paid service. Without it you can fill in the fields, but only the browser pixel fires. To have it switched on, write to support@cloudcart.com. TikTok's Events API works on every plan.
What you need before you start
- Accounts. A Meta business portfolio with a pixel (Events Manager now calls it a Dataset) and admin rights to generate a token. For TikTok, a TikTok for Business account with a web pixel.
- A cookie banner. The GDPR app in Apps → GDPR → Cookies with the Targeting group active. Both the pixel and the server connection fire only after the visitor accepts it. The rules are in our guide to GDPR and cookies.
- A second browser for testing. While you are logged in to the store admin, no events are sent, so your own clicks never mix with customer data.
How to add the Meta Pixel to your store, step by step
- Create the pixel in Meta. In Events Manager connect a new data source → Web, name it and note the ID, a long number such as
432543676657523. - Open the settings in CloudCart. Apps → XML Feed → Facebook → Settings. If XML Feed is not installed, install it from Apps.
- Facebook Pixel ID. Paste only the number. The store does not recognize Meta's full pixel code.
- Enable Extended ViewContent. Turn it on if your products have variants (size, color), so Meta gets fuller data on the product group.
- Access Token. In Events Manager open the pixel → Settings → Conversions API → Generate Access Token, and paste it into Access Token.
- Enable CAPI. Switch it on and save. If the feature is not active on your store, the admin shows a warning and only the browser pixel fires.
Important: CloudCart does not renew the Access Token. If Meta revokes it, for example after an admin change on the business portfolio, paste a new one. The store keeps working, but server events stop, and the only sign is in Events Manager → Diagnostics.
How to check that events reach Meta
- Get the test code. Copy it from Events Manager → Test Events (it changes every session) into the Test Event Code field in the store and save.
- Open the store in a private window. Accept all cookies. Without Targeting consent nothing fires and the test looks broken.
- Walk the buyer's path. Open a product, search, add to cart, start checkout and place a test order.
- Compare the events. Test Events should show PageView, ViewContent, Search, AddToCart, InitiateCheckout and Purchase within seconds, from the browser and, with CAPI on, from the server.
- Delete the test code. Clear the field and save. While it is there, real events arrive as tests and drop out of your ad reports.
The Meta Pixel Helper extension for Chrome shows browser events on each page. Server events appear only in Events Manager.
Which events CloudCart sends to Meta and TikTok
CloudCart sends a fixed set of standard ecommerce events, with no switch per event. Each carries the currency, the value and the products with ID, name, quantity and price.
| Action in the store | Meta | TikTok |
|---|---|---|
| Opens a page | PageView | Pageview |
| Views a product or category | ViewContent | ViewContent |
| Searches the store | Search | Search |
| Adds to cart | AddToCart | AddToCart |
| Adds to wishlist | AddToWishlist | AddToWishlist |
| Starts checkout | InitiateCheckout | InitiateCheckout |
| Completes an order | Purchase | CompletePayment |
- Custom events such as a newsletter signup need Google Tag Manager, which is on every plan. See our guide to GA4 and Google Tag Manager.
- Purchase fires from the thank-you page, so an order entered in the admin or by phone sends none.
- SubscribedButtonClick next to every AddToCart is Meta's own automatic tracking. You can turn it off in the pixel settings in Events Manager.
What data the Conversions API sends and what Event Match Quality is
Event Match Quality (EMQ) is the 0 to 10 score in Events Manager for how well Meta matches a server event to a profile. More customer data means a higher score and more purchases attributed to your ads (Meta for Developers: Conversions API best practices).
CloudCart takes customer data in order of reliability: a logged-in account, the customer linked to the cart, a confirmed subscriber, then the checkout fields. Email, phone, name and address are hashed (SHA-256) before they leave the server.
| Data in the event | Source in CloudCart | What it helps with |
|---|---|---|
| Email and phone (hashed) | Account, cart, subscriber or checkout | The strongest match signal |
| Name, city, postcode, country | Shipping or billing address | Match when the email is missing |
| IP address and user agent | The visitor's request | Present in every event |
| fbp and fbc | The _fbp and _fbc cookies | Link the server event to the browser and the ad click |
| external_id | Anonymous visitor ID | Ties browser and server events to one visitor |
The score rises when more customers leave an email before buying: by logging in, subscribing or entering it early in checkout. Subscriber forms (Pop-up Builder) go up to 3 on Starter Pack, 10 on CC Pro and 25 on CC Master (Pricing).
Important: the server connection cannot slow an order. Each request to Meta has a 3-second limit, and after 3 errors in a row CloudCart pauses requests for 60 seconds. The browser pixel keeps working.
How to set up the TikTok Pixel and Events API
- Create the pixel in TikTok. In TikTok Events Manager create a web pixel with manual setup and copy its code, such as
C5XXXXXXXXX(TikTok Business Help: get started with the pixel). - Open the app. In CloudCart: Apps → TikTok Dynamic Ads → Settings, and paste it into Pixel Code (required, at least 3 characters).
- Access Token. Generate it in the pixel settings in TikTok Events Manager (TikTok Business Help: Events API). It is required only with Events API on and needs at least 10 characters.
- Enable Events API (Server-Side). Switch it on and save.
- Test. Use the Test Events code in the Test Event Code field, walk the buyer's path in a private window and delete the code afterwards.
Server events to TikTok carry the email and phone only hashed (SHA-256), plus TikTok's click cookies (ttclid, _ttp) that tie the order to the ad click. If TikTok does not answer within 5 seconds, the event is skipped without delaying the order.
Almost every TikTok ad click opens your store on a phone, so test on a phone as well. A slow product page or a cart that needs pinch-zooming shows up as lots of ViewContent and few purchases. Our guide to the mobile version of an online store covers what to check.
Meta vs TikTok in CloudCart: the setup side by side
| Meta (Facebook and Instagram) | TikTok | |
|---|---|---|
| Admin path | Apps → XML Feed → Facebook → Settings | Apps → TikTok Dynamic Ads → Settings |
| Identifier | Facebook Pixel ID (a number) | Pixel Code |
| Server connection | Conversions API, outside the plans | Events API, every plan |
| Purchase event | Purchase | CompletePayment |
| Pixels per store | 1 | 1 |
| Catalog on the same screen | Yes | Yes |
If you need two pixels, for example for two ad accounts, add them through Google Tag Manager and switch off CAPI in CloudCart so events are not duplicated. With the Data Layer app, CloudCart sends GTM ecommerce events in GA4 format (view_item, add_to_cart, begin_checkout, purchase).
The product catalog for Facebook, Instagram and TikTok
The catalog is an XML feed of your products that Meta and TikTok pull for dynamic ads: the pixel says which product a person viewed, the catalog supplies the image, price and stock.
- Meta. Copy the public URL of the feed from Apps → XML Feed → Facebook into Commerce Manager and connect the pixel to the catalog. Product categories come from the Google category set on each store category.
- TikTok. The feed is in TikTok Dynamic Ads, with UTM parameters for links and a choice of which option is color and which is size.
The XML feed holds up to 100 products on Baby Pack, 2,000 on Starter Pack, 7,500 on CC Pro and 10,000 on CC Master (Pricing).
Why Meta shows fewer purchases than your store
Meta almost always reports fewer purchases than CloudCart, because some buyers decline advertising cookies and some orders are entered by hand. A small, steady gap is normal. A large or sudden one points to the setup.
| Cause | What you see | What to do |
|---|---|---|
| Targeting consent declined | Order in the store, not in Meta | Clearer banner text can raise acceptance |
| Test Event Code left in place | Purchases vanish after a test | Clear the field and save |
| Access Token revoked | Browser events only, errors in Diagnostics | A new token from Events Manager |
| Order from the admin or by phone | No Purchase | Expected |
| A second pixel in GTM or custom code | Purchases counted twice | Keep one source of events |
Reconcile weekly: Purchase in Events Manager against store orders for the same days. CloudCart orders keep the UTM source, medium and campaign, and Analytics → Sales by Source / Medium shows revenue from facebook / cpc down to campaign level. On Pricing “UTM tracking” is marked for CC Pro and CC Master, so on smaller plans check the report in your store first. More on the Analytics page.
Which numbers to watch once the pixel works
| Number | How it is calculated | Warning sign |
|---|---|---|
| Purchase coverage | Purchase in Events Manager ÷ store orders | A sudden drop week on week |
| Event Match Quality | 0 to 10 score for Purchase | Falls after a theme or checkout change |
| Cart-to-order conversion | Orders ÷ carts (Analytics → Conversion Funnel) | Many AddToCart, few Purchase |
| ROAS from orders | Revenue from orders with UTM facebook or tiktok ÷ spend | Far below the ROAS in Ads Manager |
| Mobile session share | Phone sessions ÷ all sessions (Analytics → Online store sessions by device type) | Mostly phone sessions, few ad purchases |
When mobile sessions grow and Purchase stays low against ViewContent, go through checkout on a phone before changing the ad.
How to pull the numbers from your store with Claude or another AI assistant
An AI assistant connected to your store does the weekly reconciliation from one sentence. Claude Code, ChatGPT Codex, Gemini CLI, Cursor or VS Code connect with the sentence from the AI assistant page and a PAT token (personal access token) from the admin, which can be read-only, with an expiry date and allowed IP addresses.
- Purchases. “How many orders came in from Monday to Sunday, and how many have UTM facebook or tiktok?” Compare with Purchase and CompletePayment in the two Events Managers.
- Real ROAS. Give it the Ads Manager export: “Divide revenue from orders with UTM facebook by spend per campaign.” Meta counts its own events, the assistant counts your actual orders.
- Catalog. “Show products with no image, description or stock.” Meta and TikTok can reject products with no image or stock.
Best practices for the pixel in your online store
- Pixel from day one. Retargeting audiences build only from visits after setup, so add it weeks before your ads.
- One source of events. The built-in integration or GTM, never both for one pixel.
- Test after every change to the theme, checkout or payment methods, and end each test with an empty Test Event Code field.
- UTM on every ad.
utm_source,utm_mediumandutm_campaignshow the campaign behind each order, whatever Meta reports. - A clear cookie banner. A short line on what the shopper gets can raise Targeting consent.
Pixel setup mistakes to avoid
- The full pixel code in the ID field. It takes only the number.
- Testing logged in or without accepting cookies. No events are sent, and the setup looks broken.
- The same pixel in GTM and in CloudCart. Purchases count twice and your ads learn from wrong numbers.
- Judging ads by Meta's report alone. Base budget decisions on the orders in your store.
Other Facebook, Instagram and TikTok connections in CloudCart
| App | What it is for |
|---|---|
| TikTok Ads | Campaigns, budgets, audiences and reports for TikTok from the admin |
| TikTok Shop | Selling your products in TikTok Shop |
| Social Feed | Your latest Instagram, Facebook and TikTok posts in a store section |
| Facebook Comments | Facebook comments under products and blog posts |
| Google Tag Manager | More pixels and custom events |
The next step after the pixel is the ad that brings back shoppers who left their cart, covered in our Meta Ads guide. Winning them back by email is in our guide to abandoned carts. Questions about the setup: support@cloudcart.com.
Frequently asked questions
In CloudCart open Apps → XML Feed → Facebook → Settings and paste the numeric Facebook Pixel ID from Events Manager. The store places the code and sends events from product views to purchases, with no JavaScript in your theme.
CAPI (Conversions API) is Meta's server-side connection, which still delivers purchases when the browser blocks the pixel. In CloudCart it needs an Access Token and is not included in the plans on /pricing, so write to support@cloudcart.com to have it switched on.
Paste the code from Events Manager → Test Events into the Test Event Code field. Open the store in a private window, logged out of the admin, accept the cookies and place a test order. Events appear in seconds. Then clear the field.
In Meta Events Manager, under data sources, where the pixel (Dataset) is listed. It is a long number, and in CloudCart you paste only that number.
Meta charges no fee for the pixel, and in CloudCart the browser pixel is on every plan. The Conversions API is outside the plans on /pricing, while TikTok's Events API is on every plan.
In Apps → TikTok Dynamic Ads → Settings paste the Pixel Code from TikTok Events Manager. For server events add an Access Token and switch on Enable Events API (Server-Side). Purchases reach TikTok as CompletePayment.
Sources
- Meta Business Help: set up the Meta Pixelwww.facebook.com
- Meta Business Help: Conversions APIwww.facebook.com
- Meta for Developers: Conversions API best practicesdevelopers.facebook.com
- TikTok Business Help: get started with the pixelads.tiktok.com
- TikTok Business Help: Events APIads.tiktok.com
