Marketing

Meta Pixel, Conversions API and TikTok Pixel: setup for your store

Meta Pixel, Conversions API and TikTok Pixel in CloudCart: where the ID goes, how to switch on CAPI and how to check that purchases reach Meta.

The CloudCart team15 min read
A laptop showing an online store front, with thin lines of light running from it to two phones with vertical social media feeds
In this article · 17 sections
  1. What the Meta Pixel is and what it does
  2. Pixel vs Conversions API (CAPI): what is the difference
  3. What you need before you start
  4. How to add the Meta Pixel to your store, step by step
  5. How to check that events reach Meta
  6. Which events CloudCart sends to Meta and TikTok
  7. What data the Conversions API sends and what Event Match Quality is
  8. How to set up the TikTok Pixel and Events API
  9. Meta vs TikTok in CloudCart: the setup side by side
  10. The product catalog for Facebook, Instagram and TikTok
  11. Why Meta shows fewer purchases than your store
  12. Which numbers to watch once the pixel works
  13. How to pull the numbers from your store with Claude or another AI assistant
  14. Best practices for the pixel in your online store
  15. Pixel setup mistakes to avoid
  16. Other Facebook, Instagram and TikTok connections in CloudCart
  17. 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 needsFacebook Pixel IDPixel ID + Access Token + Enable CAPI
Stopped by an ad blockerYesNo
Needs cookie consentYes, the Targeting groupYes, the Targeting group
Availability in CloudCartEvery planNot 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

  1. 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.
  2. Open the settings in CloudCart. Apps → XML Feed → Facebook → Settings. If XML Feed is not installed, install it from Apps.
  3. Facebook Pixel ID. Paste only the number. The store does not recognize Meta's full pixel code.
  4. Enable Extended ViewContent. Turn it on if your products have variants (size, color), so Meta gets fuller data on the product group.
  5. Access Token. In Events Manager open the pixel → Settings → Conversions API → Generate Access Token, and paste it into Access Token.
  6. 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

  1. 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.
  2. Open the store in a private window. Accept all cookies. Without Targeting consent nothing fires and the test looks broken.
  3. Walk the buyer's path. Open a product, search, add to cart, start checkout and place a test order.
  4. 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.
  5. 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 storeMetaTikTok
Opens a pagePageViewPageview
Views a product or categoryViewContentViewContent
Searches the storeSearchSearch
Adds to cartAddToCartAddToCart
Adds to wishlistAddToWishlistAddToWishlist
Starts checkoutInitiateCheckoutInitiateCheckout
Completes an orderPurchaseCompletePayment
  • 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 eventSource in CloudCartWhat it helps with
Email and phone (hashed)Account, cart, subscriber or checkoutThe strongest match signal
Name, city, postcode, countryShipping or billing addressMatch when the email is missing
IP address and user agentThe visitor's requestPresent in every event
fbp and fbcThe _fbp and _fbc cookiesLink the server event to the browser and the ad click
external_idAnonymous visitor IDTies 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

  1. 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).
  2. Open the app. In CloudCart: Apps → TikTok Dynamic Ads → Settings, and paste it into Pixel Code (required, at least 3 characters).
  3. 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.
  4. Enable Events API (Server-Side). Switch it on and save.
  5. 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 pathApps → XML Feed → Facebook → SettingsApps → TikTok Dynamic Ads → Settings
IdentifierFacebook Pixel ID (a number)Pixel Code
Server connectionConversions API, outside the plansEvents API, every plan
Purchase eventPurchaseCompletePayment
Pixels per store11
Catalog on the same screenYesYes

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.

CauseWhat you seeWhat to do
Targeting consent declinedOrder in the store, not in MetaClearer banner text can raise acceptance
Test Event Code left in placePurchases vanish after a testClear the field and save
Access Token revokedBrowser events only, errors in DiagnosticsA new token from Events Manager
Order from the admin or by phoneNo PurchaseExpected
A second pixel in GTM or custom codePurchases counted twiceKeep 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

NumberHow it is calculatedWarning sign
Purchase coveragePurchase in Events Manager ÷ store ordersA sudden drop week on week
Event Match Quality0 to 10 score for PurchaseFalls after a theme or checkout change
Cart-to-order conversionOrders ÷ carts (Analytics → Conversion Funnel)Many AddToCart, few Purchase
ROAS from ordersRevenue from orders with UTM facebook or tiktok ÷ spendFar below the ROAS in Ads Manager
Mobile session sharePhone 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

  1. Pixel from day one. Retargeting audiences build only from visits after setup, so add it weeks before your ads.
  2. One source of events. The built-in integration or GTM, never both for one pixel.
  3. Test after every change to the theme, checkout or payment methods, and end each test with an empty Test Event Code field.
  4. UTM on every ad. utm_source, utm_medium and utm_campaign show the campaign behind each order, whatever Meta reports.
  5. 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

AppWhat it is for
TikTok AdsCampaigns, budgets, audiences and reports for TikTok from the admin
TikTok ShopSelling your products in TikTok Shop
Social FeedYour latest Instagram, Facebook and TikTok posts in a store section
Facebook CommentsFacebook comments under products and blog posts
Google Tag ManagerMore 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

  1. Meta Business Help: set up the Meta Pixelwww.facebook.com
  2. Meta Business Help: Conversions APIwww.facebook.com
  3. Meta for Developers: Conversions API best practicesdevelopers.facebook.com
  4. TikTok Business Help: get started with the pixelads.tiktok.com
  5. TikTok Business Help: Events APIads.tiktok.com
The CloudCart teamChecked against the platform documentation. Questions: support@cloudcart.com

Build your online store

The first 3 months on every plan are €1/month. Questions: support@cloudcart.com

Create a store for €1