Splitlab

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:

PartWhat it doesWhere you set it up
Notify URLLets SamCart send each order, upsell and refund to SplitlabSplitlab → Integrations → SamCart, then SamCart's Webhooks app
Tracking parameterMakes SamCart keep the Splitlab visitor ID on each orderSamCart → Marketplace Settings → Tracking & Pixels
Splitlab snippetAdds the visitor ID to every link that points to your SamCart checkoutThe 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

  1. In Splitlab, select the workspace, then open Integrations → SamCart.
  2. Click Create and give the integration a name, for example SamCart – main store.
  3. 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

  1. In SamCart, open the App Marketplace, search for Webhooks, and open it.
  2. Add a Global rule so it applies to every product.
  3. Paste the Splitlab Notify URL.
  4. Choose these triggers:
TriggerWhat Splitlab records
Order completedThe order total as revenue
Upsell purchasedThe upsell as its own revenue, so it is never merged into the main order
Product refundedReverses the order's revenue
Product partially refundedReverses 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.

  1. In SamCart, open Marketplace Settings → Tracking & Pixels.
  2. Click Add Parameter and add mvt_visitor_id.
  3. Save.

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:

ActionMeaning
revenueRecorded. Splitlab credits it to the visitor's test variant if they were in a running test
refundA refund reversed revenue Splitlab recorded earlier
acknowledgedReceived, but the event carries no revenue (for example a subscription lifecycle event)
rejected_tokenThe token in the URL is wrong. Copy the Notify URL again, or create a new one
disabledSamCart is switched off for your account. Contact support

Sending the same order twice never counts it twice.

How attribution works

  1. A visitor lands on a tested page and is assigned a variant.
  2. They click through to SamCart. The engine has added their visitor ID to the link.
  3. SamCart keeps the ID on the order (step 3) and includes it in the notification.
  4. 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.