Skip to content
Gama
Ad tracking

What is a pixel? Ad tracking for Salla stores, from scratch

What an ad pixel is, how it tracks purchases for Snapchat, TikTok and Meta on a Salla store, why you need Conversions API and how to avoid duplicates.

Gama Team, Product and marketing team at GamaUpdated 8 min read
Browser pixel and server sending the same purchase to an ad platform

If you spend on Snapchat, TikTok or Meta ads, every decision the platform makes for you - who sees the ad, what you pay, when a campaign stops - rests on one thing: the results it can see from your store. The tool that carries those results is the pixel.

This guide explains pixels from scratch for Salla merchants: how they work, why they miss sales today, what Conversions API adds, and how to build ad tracking you can trust before you raise your budget.

What is a pixel?#

A pixel is a small script each ad platform provides. Added to your store, it runs in the visitor's browser and sends events to the platform: a page opened, a product viewed, an item added to cart, checkout started, a purchase completed.

The platform uses these events for three things:

  1. Measurement: how many orders each campaign brought and your return on ad spend (ROAS).
  2. Optimisation: the algorithm learns from real buyers and finds people like them.
  3. Targeting: retargeting people who viewed a product or left a cart.

The more accurate the events, the faster the algorithm learns and the lower your cost per order.

The events that matter#

EventWhen it firesWhy it matters
PageViewAny page opensRetargeting audiences
ViewContentA product page opensWhich products attract interest
AddToCartItem added to cartStrong intent signal
InitiateCheckoutCheckout startsMeasures drop-off before buying
PurchaseOrder completedThe event sales campaigns optimise on

Purchase matters most. If it goes missing, the platform thinks a campaign is failing while it's actually selling.

Why your pixel misses sales#

A browser pixel runs on the shopper's device, which is both its strength and its weakness:

  • Browser privacy features limit and clear cookies quickly.
  • Ad blockers stop platform scripts from loading at all.
  • Early tab closes: the shopper pays and closes the tab before the thank-you page loads, so no purchase event fires.
  • Slow mobile networks move on before the event finishes sending.

The usual result: Ads Manager shows fewer orders than your Salla dashboard. That gap isn't just a reporting issue; it's missing training data for the algorithm that decides where your money goes.

What is Conversions API?#

Conversions API (TikTok calls it Events API) is a second way to send events: from the server straight to the platform. When the order is created in Salla, the purchase is sent from the server with data that helps matching, such as email and phone, hashed first.

It skips the browser, so ad blockers and closed tabs don't affect it. It doesn't replace the pixel, though: the pixel still captures browsing events and click IDs that help link the order to the ad. Run both.

Stop double counting#

Send the purchase from both browser and server and the platform receives two events for one order. Unless it knows they're the same, it counts two, ROAS inflates, and a weak campaign looks good.

The fix is deduplication: both events carry the same event name and a shared event ID tied to the order number. When the platform sees the same ID twice, it keeps one.

Which platforms accept server events?#

PlatformBrowserServer
Meta (Facebook, Instagram)PixelConversions API
TikTokPixelEvents API
SnapchatPixelConversions API
Google Analytics 4gtagMeasurement Protocol
PinterestTagConversions API

In Saudi Arabia a large share of ad spend goes to Snapchat and TikTok, so don't stop at Meta.

How to add pixels to a Salla store#

  1. Salla's built-in integrations: fields for some platforms. Quick, but mostly browser-based, with little control over server events.
  2. Pasting code into the theme: flexible in theory, but needs expertise, breaks with theme updates and doesn't solve the server side.
  3. Universal Pixel Tracker from the Salla App Store: adds the pixels, sends server-side purchases and shares the event ID, without touching the theme.

Checklist before you raise your budget#

  • One pixel per platform, no duplicates in the theme.
  • All five events arrive from the browser.
  • Purchases arrive from the server on platforms that support it.
  • Both events share an ID and the platform counts one order.
  • A test order checked in each platform's test events tool.
  • Platform purchases compared with Salla orders for a full week.

Next#

Pick the platform you spend most on: Snapchat pixel on Salla, TikTok pixel and Events API, or Meta Conversions API. If your team compares channels in Google Analytics, read why GA4 doesn't match your Salla orders.

Read next: Event Match Quality, IOS privacy ad tracking, Retargeting for online stores, Pinterest ads, X ads for online stores.

FAQ

What is a pixel, in short?

A small piece of code from an ad platform that runs on your store and tells the platform what visitors do, such as viewing a product, adding to cart or buying, so it can measure and improve your ads.

Is the pixel enough on its own?

Not for most stores today. Blocked cookies and closed tabs lose some purchases, so the purchase is also sent from the server through a Conversions API.

Can a purchase be counted twice?

Yes, if it's sent from the browser and the server without a shared event ID. Give both events the same ID and the platform keeps one.

Do I need a developer to add pixels to Salla?

No. An app from the Salla App Store can add the pixels and send server-side purchases without touching your theme.

Steps to connect the Snapchat pixel to a Salla store

How to connect the Snapchat pixel and Conversions API to a Salla store

Connect the Snapchat pixel to your Salla store, create a Conversions API token, test the purchase event and stop duplicates, so Snapchat ads learn from real sales.

6 min read

TikTok pixel and Events API sending a purchase from a Salla store

The TikTok pixel for Salla stores, and how to connect it with Events API

What the TikTok pixel is, how browser events differ from Events API, and how to connect both to your Salla store and test purchases without duplicates.

6 min read

Meta pixel and Conversions API sending one purchase that Meta counts once

How to set up the Meta Conversions API on a Salla store (without code)

Connect the Meta pixel to your Salla store, set up Conversions API, test events and raise Event Match Quality without counting orders twice.

7 min read