Splitlab home

Book a Demo

Splitlab home

Book a Demo

Splitlab home

Search for articles…

Install on Shopify, Wix, Google Tag Manager or Next.js

Install on Shopify, Wix, Google Tag Manager or Next.js

Every platform uses the same snippet from Websites → Install Smart Code. Only where you paste it changes. Next.js apps use a package instead.

1. Shopify

  1. In your Shopify admin, go to Online Store → Themes.

  2. Click Actions → Edit Code on your active theme.

  3. Open theme.liquid and paste the snippet just before the closing </head> tag.

  4. Save, then check the install.

Because theme.liquid wraps every storefront page, adding it once covers the whole store. Full guide: Shopify.

2. Wix

  1. In your Wix dashboard, go to Settings → Custom Code.

  2. Paste the snippet in the Head section and set it to load on all pages.

  3. Publish your site, then check the install.

Wix’s Custom Code feature is available on paid Wix plans. Full guide: Wix.

3. Google Tag Manager

  1. In GTM, create a new Tag of type Custom HTML.

  2. Paste the snippet into the HTML field.

  3. Set the trigger to All Pages.

  4. Publish the container, then check the install.

Be aware that GTM loads asynchronously, so anything it adds runs after the page has started to appear. The anti-flicker script can’t hide the page early enough, and visitors may briefly see the original. For flash-free tests, paste the snippet directly into your page <head> instead, and use GTM only when that isn’t possible. Full guide: Google Tag Manager.

4. Next.js

Install the @splitlabio/nextjs-orchestrator package rather than pasting the snippet. It renders the same engine and anti-flicker style the way Next.js expects.

npm install @splitlabio/nextjs-orchestrator

  • App Router: add <MVTScripts orchestratorKey="YOUR_PROJECT_KEY" /> inside <body> in app/layout.tsx.

  • Pages Router: wrap your app with <MVTOrchestrator orchestratorKey="YOUR_PROJECT_KEY"> in pages/_app.tsx.

Your project key is on the Next.js tab of the Install Smart Code panel. Deploy or restart your app, then check the install.

On Vercel, if you store the key in a NEXT_PUBLIC_ environment variable, redeploy after setting it. These values are fixed at build time, so a key added without a redeploy stays empty and no variants are served. See the Next.js guide and the SDK reference.

5. Still stuck?

Using a platform that isn’t listed here? Get in touch through our contact page or email team@splitlab.io and tell us which page or integration you’re working on.

Still stuck?

Email team@splitlab.io or send us a message.

Contact us


Start optimizing for revenue today not just conversion rates.

Run experiments, track revenue per variation, and scale what actually makes you money.

We’ll increase your conversion rate by 30% or you don’t pay. Terms apply.


Start optimizing for revenue today not just conversion rates.

Run experiments, track revenue per variation, and scale what actually makes you money.

We’ll increase your conversion rate by 30% or you don’t pay. Terms apply.


Start optimizing for revenue today not just conversion rates.

Run experiments, track revenue per variation, and scale what actually makes you money.

We’ll increase your conversion rate by 30% or you don’t pay. Terms apply.