Customer events
Measure visits and ads with Meta, Google Analytics, TikTok, Pinterest, Snapchat, Microsoft Advertising, Reddit or your own address, for visitors who agree.
In the admin Settings › Customer events
Open Settings › Customer events. Measure your ads with the visitors who agree to it.
Meta pixel and Conversions API
For Facebook and Instagram ads: see which ads bring visitors, and reach them again.
- Pixel ID: in Meta Events Manager, Data sources › your pixel › Settings. Digits only.
- Conversions API token (optional): in Events Manager, your pixel › Settings › Conversions API › Generate access token. With it, events also go from Storeloom’s servers to Meta, so fewer are lost to ad blockers.
- Measure visits: untick it to pause measuring without removing anything.
- Connect Meta saves them; after that, Apply in the bar at the top (it says Unsaved changes while something is not saved) saves changes. The page shows Pixel only or Pixel and Conversions API, and whether it is Measuring or Paused.
To check it works, add a Test event code (from Events Manager › Test events) and Send test event; it shows under Test events in Meta.
Disconnect removes the pixel ID and the token, after you confirm.
A market’s own Meta pixel
When your store has markets, Market at the top of the card chooses whose Meta pixel you see: All markets (the pixel that hears of every visit and order) or one market. Choose a market to connect its own pixel the same way, with its own token and test event code. A market’s pixel hears only of that market: visits to its own domain or folder, shoppers in its countries, and orders placed in it. A market for Google or Meta isn’t offered: it only narrows a feed, and no visit or order ever happens in it. The pixel for all markets keeps hearing of everything, so each market can have its own pixel with or without one for all. The card lists the markets with their own pixel. Disconnecting one market’s pixel leaves the others.
Pixels
Beside Meta, add up to 10 pixels with Add pixel, then choose where events go. When your store has markets, Market in the pixel’s dialog limits it to one market (for example the Google Analytics property of your Romanian domain): it then hears only of that market’s visits and orders. All markets hears of every one. Each pixel shows which market it measures.
- Google Analytics 4: visits, product views, carts and sales in your Google Analytics property. Enter the Measurement ID (Google Analytics › Admin › Data streams › your web stream, it starts with G-) and a Measurement Protocol API secret (the same stream › Measurement Protocol API secrets › Create).
- TikTok: product views, carts, checkouts and purchases for your TikTok ads. Enter the Pixel ID (TikTok Ads Manager › Tools › Events › Web events) and an Events API access token (the pixel’s Settings › Events API › Generate access token). A Test event code from the pixel’s Test events tab marks the test events you send from here.
- Pinterest: page visits, carts and purchases for your Pinterest ads. Enter the Ad account ID and a Conversions access token (Ads Manager › Conversions › Conversions API › Generate new token).
- Snapchat: page views, product views, carts, checkouts and purchases for your Snapchat ads. Enter the Pixel ID (Snapchat Ads Manager › Events Manager, your Pixel; it looks like 1a2b3c4d-…) and a Conversions API token (your Pixel › Setup › Conversions API › Generate token).
- Microsoft Advertising (Bing): page views, product views, carts, checkouts and purchases for your Microsoft Advertising ads, through Microsoft’s Conversions API. Enter the UET tag ID (Microsoft Advertising › Tools › UET tag, the number of your tag) and a Conversions API token (the same tag › Edit › Use Conversions API › Copy token). Microsoft may first have to switch the Conversions API on for your account. Each event carries the visitor’s measurement id, so Microsoft can tell one visitor’s events apart.
- Reddit: page visits, product views, carts and purchases for your Reddit ads (Reddit has no checkout start). Enter your Ad account ID (Reddit Ads Manager, like a2_abc123def) and a Conversions access token (Reddit Ads Manager › Events Manager › Conversions API › Generate access token).
- Custom pixel: every event as signed JSON, posted to an address of yours. It must start with https:// and be on the public internet. Storeloom makes a signing key and shows it once: copy it then. New signing key in the pixel’s dialog makes another and stops the old one.
Each pixel shows whether it is Measuring or Paused, and its last event or why it was not sent. Send test sends it a test event: a page view (a product view for TikTok), shown under test events where the provider has them (Pinterest’s test events, TikTok’s test event code, Google Analytics' DebugView); Snapchat checks a test event without counting it, Reddit takes it in test mode; Microsoft has no test events, so its test is an ordinary page view. Edit changes it; a saved secret stays unless you Replace it, and nobody sees it again, only how it ends. Remove deletes the pixel and its secret, after you confirm.
What a custom pixel receives
Each event is a POST with a JSON body: id (the same for Meta), name (PageView, ViewContent, AddToCart, InitiateCheckout or Purchase), occurredAt, url, visitor (the visitor’s measurement id) and, for products, carts and orders, data with value, currency, items (id, name, price, quantity) and, for a purchase, the order’s name. A test has test: true. It never has the visitor’s IP address, browser or email.
The storeloom-signature header is t=<time>,v1=<signature>: the signature is the HMAC-SHA256 of the time, a dot and the body, keyed with your signing key, as for webhooks. Answer with a 2xx status; busy answers (429 and 5xx) are tried again, other answers are shown on the pixel and not retried.
How it works
- Your store’s cookie banner asks visitors in categories (Settings › Customer privacy). While Meta or a pixel is on, it also asks about Marketing and names who measures (for example “Google Analytics and TikTok”). Declining is as easy as accepting, and only visitors who allow Marketing are measured; Analytics, your store’s own cookie for Attribution, is a separate choice and passes nothing to these services. A “Cookie settings” link in the footer lets them change their mind.
- On a market’s pages, the banner names only the pixels that measure that market: those for all markets and the market’s own. A pixel of another market never hears of the visit.
- A visitor who allows Marketing agrees to the services that banner named, and no others. If they reach a page measured by a service they weren’t told of, for example another market’s TikTok pixel, the banner asks again, and until they accept, that service hears nothing: no visit, no order, no email address. What they accepted before keeps measuring, and declining stops it all.
- Visitors who accepted before your store kept these names count for your pixels for all markets, and are asked again about a market’s own.
- Visitors in the United States are measured until they turn it off in Cookie settings, with no banner first (a browser that sends Global Privacy Control is asked first); everywhere else only visitors who allow Marketing are measured.
- On a store that shows its Do not sell or share page (Settings › Customer privacy), a shopper who asks there, or whose browser sends Global Privacy Control, is measured by none of these services, and Klaviyo hears nothing of their browsing.
- A purchase goes to the Meta pixels of the market the order was placed in, in the browser as on Storeloom’s servers, whichever market’s pages the shopper was on.
- Your store runs no third-party scripts (only Storeloom’s own small one, which makes the cart and search instant), so Meta’s pixel reports as an image. With a token, the same events also go from Storeloom’s servers to Meta with the same event ID, so Meta counts each once. The other pixels get their events from Storeloom’s servers only.
- Sent: a page view on every page, a product view on product pages, add to cart, the start of checkout, and each purchase with what the order is worth without its tip. A purchase is counted once, however often its page is seen. Each provider gets the events it has: TikTok has no page view, and Pinterest no checkout start.
- Allowing Marketing gives the visitor a random measurement id, kept with their choice: Google Analytics counts them as one visitor with it. Declining or taking Marketing back removes it.
- With TikTok, Pinterest, Snapchat, Microsoft Advertising or Reddit, accepting also keeps the click id its ads add to links (
ttclid,epik,ScCid,msclkid,rdt_cid) in your store’s own cookie for 30 days, sent with each event to that service only. Declining removes them. - With Meta, accepting also keeps Meta’s click id (from the
fbclidFacebook and Instagram add to links) and a browser id in your store’s own cookies for 90 days. Both go with every event to the Conversions API, and the page address Meta sees keeps the link’s tags, so Meta can tie purchases to its ads. Declining removes them. - Each provider gets only what it uses: the visitor’s IP address for Google Analytics' location, the address, browser and (for a purchase) the hashed email for TikTok, Pinterest, Snapchat, Microsoft Advertising and Reddit (Reddit gets the address hashed too), and none of these for a custom pixel.