Documentation
SamCart
Connect SamCart so the revenue it takes counts toward your A/B tests. When a buyer checks out, SamCart notifies Splitlab, and Splitlab credits the money to the test variant that buyer saw on your landing page.
The setup has three parts, all done once per workspace:
| Part | What it does | Where you set it up |
|---|---|---|
| Notify URL | Lets SamCart send each order, upsell and refund to Splitlab | Splitlab → Integrations → SamCart, then SamCart's Webhooks app |
| Tracking parameter | Makes SamCart keep the Splitlab visitor ID on each order | SamCart → Marketplace Settings → Tracking & Pixels |
| Splitlab snippet | Adds the visitor ID to every link that points to your SamCart checkout | The landing pages you are testing |
Availability
SamCart is rolling out gradually. If you don't see SamCart under Integrations, contact Splitlab support to have it switched on.
Before you start
- A SamCart account with permission to install Marketplace apps.
- The Splitlab snippet installed on the landing pages that link to your SamCart checkout.
- The Splitlab role that can manage integrations in the workspace.
1. Create the Notify URL in Splitlab
- In Splitlab, select the workspace, then open Integrations → SamCart.
- Click Create and give the integration a name, for example
SamCart – main store. - Copy the Notify URL. It is shown once.
The Notify URL contains a secret token, because SamCart can't send custom headers. Treat it like a password: anyone who has it can send orders to your workspace. If it leaks, create a new one and replace it in SamCart.
2. Add the webhook in SamCart
- In SamCart, open the App Marketplace, search for Webhooks, and open it.
- Add a Global rule so it applies to every product.
- Paste the Splitlab Notify URL.
- Choose these triggers:
| Trigger | What Splitlab records |
|---|---|
| Order completed | The order total as revenue |
| Upsell purchased | The upsell as its own revenue, so it is never merged into the main order |
| Product refunded | Reverses the order's revenue |
| Product partially refunded | Reverses only the refunded amount |
Use Order completed rather than Product purchased. Both describe the same purchase, and choosing both can record an order with the wrong amount.
3. Keep the visitor ID on each order
SamCart's checkout runs on SamCart's own domain, so it can't read Splitlab's cookie from your landing page. The visitor ID travels in the checkout link instead, and SamCart has to be told to keep it.
- In SamCart, open Marketplace Settings → Tracking & Pixels.
- Click Add Parameter and add
mvt_visitor_id. - Save.
4. Link to SamCart from a tested page
With the snippet installed, the Splitlab engine finds every link to samcart.com or a
*.samcart.com subdomain and adds two parameters:
https://yourstore.samcart.com/products/course?mvt_visitor_id=visitor-…&mvt_claim=mvtt_…You don't need to change your links. The engine also covers links added after the page loads, and links clicked before the page has finished loading.
Custom checkout domains
If your checkout runs on your own domain (for example checkout.yourbrand.com), the engine can't
recognise it as SamCart, and links to it are not stamped. Splitlab then matches the order to the
visitor by the buyer's email when it can. For the most reliable attribution, link to your
samcart.com checkout URL.
5. Check it works
Place a test order through a tested landing page. In Splitlab, Integrations → SamCart shows the integration as Connected once the first notification arrives, and View events lists each notification with what Splitlab did with it:
| Action | Meaning |
|---|---|
revenue | Recorded. Splitlab credits it to the visitor's test variant if they were in a running test |
refund | A refund reversed revenue Splitlab recorded earlier |
acknowledged | Received, but the event carries no revenue (for example a subscription lifecycle event) |
rejected_token | The token in the URL is wrong. Copy the Notify URL again, or create a new one |
disabled | SamCart is switched off for your account. Contact support |
Sending the same order twice never counts it twice.
How attribution works
- A visitor lands on a tested page and is assigned a variant.
- They click through to SamCart. The engine has added their visitor ID to the link.
- SamCart keeps the ID on the order (step 3) and includes it in the notification.
- Splitlab credits the order to the variant that visitor saw.
If the visitor ID is missing, Splitlab falls back to the buyer's email, which works when the same email was captured on a tested page, for example from an opt-in form.
Limitations
- Subscription renewals are not counted. Only the first purchase and upsells count toward a test; recurring charges arrive long after the test that won them.
- Custom checkout domains are not stamped automatically. See the warning above.
- Currency: if SamCart doesn't state a currency on the order, Splitlab records it as USD.