Two lines of code, in the browser or on the server.
The script in the <head> of your pages, the order on the confirmation page. Everything else is set up in Probant. For a flicker-free display, assignment can happen on your server, before rendering.
<script async src="https://getprobant.com/sdk/v1.js" data-key="pk_…"></script> probant.track("commande", montant);
Getting started
- Snippet added to the site
- First events received
- First test launched
Each step checks itself off as soon as Probant detects it.
Read the transcript
How many lines does it take to start? From the snippet pasted in the <head> to your team’s tools.
One snippet, in the <head>. The script weighs 6,953 bytes compressed, under its 7 KB budget. It loads asynchronously and doesn’t hide the page.
Nothing is sent before the visitor consents. Before consent, Probant sets no cookie, assigns no one, and sends nothing. If the visitor accepts mid-visit, the current page stays the original: the variant starts on the next page.
Server-side, the page arrives already changed. The server helper assigns the visitor before rendering: the variant is there from the first paint, and the script only measures.
Results go to your team’s tools. Alerts go to Slack or a signed webhook. Other outputs: CSV export, share link, management API, MCP server, and analytics tools.
The demo is open, no sign-up needed.
What to install.
The snippets below come from the documentation. Your workspace’s public key starts with pk_; the secret key stays on your server.
The script loads without hiding the page.
The script assigns visitors, applies the editor’s changes, and measures. It loads asynchronously; each change applies as soon as its element exists, then on every re-render (React, navigation without reload), before the next paint.
- The first block queues consent and track calls before the script loads; it is optional if you call nothing earlier
- Target stable markers ([data-add-to-cart], IDs) rather than theme classes
<script> window.probant = window.probant || []; ["consent", "track"].forEach(function (m) { probant[m] = probant[m] || function () { probant.push([m].concat([].slice.call(arguments))); }; }); </script> <script async src="https://getprobant.com/sdk/v1.js" data-key="pk_…"></script>
Consent comes first.
If your workspace requires consent (the default), the script sets no cookie, assigns no one, and sends nothing until the visitor agrees. Pass their choice on every page, as soon as your consent tool knows it.
Nothing changes in front of the visitor: if they agree while reading, the page stays as it is and their variant starts on the next page. If they agreed on a previous visit, their variant is there on load, and nothing is sent before your consent tool confirms.
- First-party probant_id cookie on your site, SameSite=Lax
- 390 days at most after the first visit, never extended
- A refusal deletes the cookie and local traces
probant.consent(true); // accepted: assignment and measurement, without switching the page on screen probant.consent(false); // refused or withdrawn: cookie and local traces deleted
One line measures a conversion.
The event name (“commande”, “ajout-panier”…) is the one your workspace’s metrics refer to. With an amount, it feeds revenue per visitor; without one, it counts as one.
probant.track("commande", 89.9); // with an amount probant.track("ajout-panier"); // without an amount: counts as 1
Server-side, the page arrives already changed.
The server-side assignment helper doesn’t depend on any framework: a Next.js proxy, a worker, a middleware. The variant is known before rendering, so there is no flicker. The script stays on the page to send exposures and conversions.
- Same draw as the script: same visitor, same variant
- The probant_id cookie, set again by your server with its original expiry, is no longer cut to 7 days by Safari
- The configuration is cached in memory for one minute; if Probant doesn’t respond, the previous one is used
- The helper’s files are copied into your project
const { setCookie, assignments } = assignRequest({ cookieHeader: request.headers.get("cookie"), url: request.url, userAgent: request.headers.get("user-agent"), config, // GET /api/v1/config, kept in memory for one minute consent: request.cookies.get("consentement")?.value === "oui", }); // assignedVariants(assignments) → { "date-livraison": "b" }
A ready-made bridge for your consent tool.
Pick your tool and copy the code: it passes the visitor’s choice to Probant (consent, refusal, or withdrawal), and nothing until they have answered. If you have no tool, tarteaucitron, free and open source, provides the banner.
<script>
tarteaucitron.services.probant = {
key: "probant",
type: "analytic",
name: "Probant",
uri: "https://getprobant.com/legal/cookies#script",
readmoreLink: "https://getprobant.com/legal/cookies#script",
needConsent: true,
cookies: ["probant_id"],
js: function () { probant.consent(true); },
// Appelé aussi tant que le visiteur n’a rien choisi : seul un refus enregistré compte.
fallback: function () {
if (/!probant=false/.test(tarteaucitron.cookie.read())) probant.consent(false);
}
};
document.addEventListener("probant_allowed", function () { probant.consent(true); });
document.addEventListener("probant_disallowed", function () { probant.consent(false); });
(tarteaucitron.job = tarteaucitron.job || []).push("probant");
</script>L’accord est donné à Probant nommément.
- Rien à créer dans tarteaucitron : le code ajoute Probant à ses services, dans la catégorie « Mesure d’audience ».
- Juste après tarteaucitron.init(…), et après l’extrait Probant.
An API for your servers.
To send events from a server, for example orders from your back office, and to read the workspace’s public configuration.
POST /api/v1/events x-probant-key: pk_… { "events": [ { "type": "conversion", "visitorId": "…", "metric": "commande", "value": 89.9, "timestamp": "2026-11-10T08:30:00Z" } ] }
- Volume
- Up to 500 events and 256 KB per request.
- Timestamp
- Unix milliseconds or an ISO 8601 date; no more than 5 minutes in the future or 7 days in the past.
- Validation
- Each event is validated on its own, so one invalid event does not block the others. The 202 response returns the count of accepted and rejected events.
- Errors
- 401 for a missing, unknown, or secret key; 413 for a body that is too large; 503 if the service is unavailable.
- Configuration
- GET /api/v1/config returns running tests, rollouts, the holdout, and the consent setting, cached for one minute.
Shopify and other platforms.
The script works on any store where you can add code to the pages’ <head>, whatever the platform.
<head> … {{ content_for_header }} <script async src="https://getprobant.com/sdk/v1.js" data-key="pk_…"></script> </head>
Through the theme.
On Shopify, paste the script into the theme template, like any snippet that goes in the <head>. Orders are measured with probant.track on the confirmation page, or through the events API from your server.
Back-office orders.
Orders can also come from the back office: through Shopify webhooks, or through the orders API from any store. Probant matches them to visitors, minus refunds, and computes margin on the server using each product’s cost, read from Shopify or imported as CSV: neither cost nor margin goes through the script. Webhooks are set up in the store’s admin.
Results go where your team works.
An alert when a test can conclude or a guardrail stops a rollout, a link to send to people without an account, and an API to run Probant from your tools or from an AI assistant.
claude mcp add --transport http probant \ "https://getprobant.com/api/v1/mcp" \ --header "Authorization: Bearer sk_…"
- Alerts
- To Slack or an https address of your choice, as a signed webhook, each event sent only once: decision ready, sample ratio mismatch, guardrail crossed, step advanced automatically, quota reached, test interaction, effect fading, feature flag turned off, variant at its floor, change not showing, conversion drop, post-launch check, overdue test, weekly report, checkpoint reached, rollout guardrails, sample ratio mismatch in a segment, quota almost reached, flags to remove, and new open-ended answers.
- CSV export
- One row per metric and per variant: the primary metric, then up to 10 secondary metrics and guardrails, raw counts included. It opens as is in a spreadsheet.
- Share link
- Read-only, opens without an account, valid for 7, 30, or 90 days, or with no expiry; up to 10 active links per report, revocable at any time.
- Management API
- Create, launch, stop, and roll out a test, manage metrics and feature flags, read results, with a secret key whose rights never exceed those of its creator. Public OpenAPI description, 120 calls per minute per key.
- MCP server
- The same operations for an AI assistant (Claude, ChatGPT…), with the same key or without one: the assistant asks you for access, never beyond your role, and can be disconnected from the settings. Launching, stopping, rolling out, or turning off a flag first shows a preview and waits for your explicit confirmation.
- Analytics tools
- If you turn it on, tool by tool, the script reports each exposure to Google Analytics 4, Segment, Contentsquare, Piano Analytics, Amplitude, Mixpanel, Matomo, Piwik PRO, Adobe Analytics, Heap, Microsoft Clarity, Hotjar, PostHog, and Plausible already installed on the page, only after the visitor agrees.
In detail.
- Weight
- 6,953 bytes compressed, under 7 KB, loaded asynchronously.
- Rendering
- The page is never hidden: 17 ms of computation, median first paint of 76 ms with Probant and 68 ms without (Chromium 153.0.8010.12, CPU slowed down 4×, median of 31 pairs of page loads without and then with Probant, measured on Nov 12, 2026).
- Keys
- Public key pk_… in the script and the events API; a secret key is rejected.
- Consent
- Nothing is set or sent before the visitor agrees, if the workspace requires it (the default).
- Retention
- Events kept for 13 months; cookie for 390 days at most.
- Hosting
- Database and compute in Amsterdam, with Scaleway, in the European Union.
Frequently asked questions.
Does the script slow down my site?
It weighs 6,953 bytes compressed and loads asynchronously, without hiding the page. Measured in Chromium 153.0.8010.12, CPU slowed down 4×, median of 31 pairs of page loads without and then with Probant, measured on Nov 12, 2026: 17 ms of main-thread work, median first paint of 76 ms with Probant and 68 ms without. For your visitors, Probant also measures LCP, INP, and CLS per variant, and the script’s real cost. For a flicker-free display, assignment can happen server-side.
Do I need to change anything to roll out a winner?
No. The script and the server helper read rollouts from the workspace configuration: the exposed share goes up from Probant, without touching your site.
Can I test a change rendered by my server?
Yes: the server helper provides the variant before rendering, your page displays it, and the script, with no change to apply, just measures.
Next: Team and governance
See this feature in the demo, on the screen this page describes, or move on to the next one.
- Open demo, no sign-up
- Free to start, no overage charges
- Database and compute in Amsterdam, with Scaleway