Introduction
A single browser script that sends storefront events to TrackBee, so your ad platforms can attribute the revenue they drove.
The TrackBee tracking SDK is one JavaScript file you add to a storefront. It identifies the visitor, picks up the ad click that brought them in, and sends you the events that matter: product views, add to carts, checkouts and orders.
You add the script once, then call trackbee.track() from your own code wherever something happens worth recording.
trackbee.track('product_view', {
product_id: '8472019',
variant_id: '4410228',
price: '29.99',
currency: 'EUR',
});What it does for you
- Identifies the visitor and keeps that identity stable across pages, so events from one person join up.
- Captures the ad click that brought them in. Google, Meta, TikTok, Pinterest, Snapchat, Microsoft and Klaviyo click IDs, plus UTM parameters, are read from the URL and attached to every event. You do not pass any of this yourself.
- Stays out of your way. It loads asynchronously, never blocks rendering, and never throws into your code.
What you do
- Install the script with your store's public API key.
- Send the events your storefront can produce. You decide which ones you can support.
- Pass consent if you run a consent banner.
The attribution and identity work happens on its own. Every event, including the page view, is one you send.
Who this is for
Anyone wiring TrackBee into a storefront by hand: a headless build, a custom theme, a platform TrackBee has no app for, or a checkout flow the standard integration cannot see.
If you run Shopify and installed the TrackBee app, you already have tracking. You do not need this script as well.
Where it is served from
https://cdn.trackbee.ai/g/trackbee-tracking-sdk.min.jsOne file, no dependencies, no build step, no package to install.
Browser support
Current versions of every major browser, plus Chrome 109, the last version that runs on Windows 7 and 8.
Internet Explorer, Opera Mini, UC Browser, QQ Browser and KaiOS are not supported.