A/B testing

Tag each version of a page once, then filter the whole dashboard by A/B variant to see which version brings in more leads, buyers and revenue.

Set this up with AI

Copy this prompt into ChatGPT, Claude or whichever AI you use. It carries this whole guide, the pages it depends on, and a link to every video, so it can walk you through it one step at a time.

Open as text

Tag each version of your page

Tag each version once and every visit to it carries that version's name, so the whole dashboard can split by it.

<script>(window._tmVariants=window._tmVariants||{})['homepage']='B';try{sessionStorage.setItem('_tmVariants',JSON.stringify(window._tmVariants));}catch(e){}</script>
  • Split name - homepage in the example. It names the test, so use the same split name on every version.
  • Variant id - B in the example. It names this version, so give each version its own id, such as A on the original and B on the new one.

Paste it high in the <head> of each version, so it runs before the TrueMetriks tracker sends the page view. The tag carries over to the visitor's next pages in the same tab, so a sale two pages later still counts for the version they saw.

To check it, open each version once in a private window and close it without clicking anything, then click Filter > A/B variant in your dashboard and make sure that version is listed. If it is missing, the tag ran too late or is not on the page.

Split names can only use letters, numbers, dash (-) and underscore (_), up to 40 characters. The dashboard and the Funnels split editor reject any other name. If a tag you paste by hand has other characters, TrueMetriks removes them before it saves the visit (home page becomes homepage) and shows a warning in the browser console; a name with nothing left is ignored. Keep variant ids as text in quotes.

If you already split-test a funnel step, the snippets TrueMetriks gives you there are this same tag, so those pages are already tagged.

Where to paste it

GoHighLevel

Tag each page on its own, never the whole funnel. Open the page in the builder with Edit, click the Tracking Code icon at the top left, paste the tag into Header Tracking and click Save. Do the same on the variation you made with Create Variation, with its own variant id. GoHighLevel does not copy tracking code when it copies a page.

Do not put the tag in the funnel's Head tracking code. That box covers every page in the funnel, so every version would get the same tag. Your TrueMetriks snippet stays there, and it loads in the background, so the tag in the page's own Header Tracking normally runs first. Keep Optimize JavaScript switched off, as the GoHighLevel install guide explains.

ClickFunnels

Tag each page on its own, never the whole funnel. Open the page in the page editor, go to Settings > Tracking Code, paste the tag into Header Code (in Classic ClickFunnels, the Header tab) and save. Do the same on the variant page you made with Split test page (Classic: Create Variation), with its own variant id.

Do not put the tag in the funnel's Head Code (Classic: Head Tracking Code). That box covers every page in the funnel, so every version would get the same tag. Your TrueMetriks snippet stays there, as the ClickFunnels install guide shows, and it loads in the background, so the tag in the page's own Header Code normally runs first.

WordPress

The TrueMetriks WordPress plugin adds the tracker for you and has no box for your own code, so add the tag to the <head> of each version of the page yourself.

Custom sites

Paste the tag in the <head> of each version, above the Tracker snippet from the custom site guide.

Shopify

Not supported yet. The Shopify pixel runs in a sandbox that cannot see the page, so it never reads the tag.

Compare the versions

Click Filter, pick A/B variant, choose Is, then pick the version, for example homepage: B. Switch the value to homepage: A to see the other version, with the same date range.

  • Is not shows every visit that did not see that version, including visits with no tag at all.
  • The filter works on every dashboard page with a Filter button: Main, Pages including scroll depth, buyers and revenue on a page's detail view, Visits, Journeys, Revenue, Leads and the rest.
  • Funnels is the one exception: a split-tested funnel step shows its own row per variant instead.

Keep the test fair

  • Split traffic evenly between the versions.
  • Compare every version over the same date range.
  • Wait for enough visits on each version before you call a winner.

Frequently asked questions

Does A/B testing work on Shopify?

Not yet. The Shopify pixel runs in a sandbox that cannot see the page, so it never reads the tag.

Do I need a funnel to run an A/B test?

No. The tag works on any page, and the A/B variant filter works on every dashboard page with a Filter button. A funnel only adds a step-by-step view of the same split.

Can I compare more than two versions?

Yes. Give each version its own variant id, such as A, B and C. There is no limit on the number of variants.

Does an A/B test hurt SEO?

Not if you keep it clean. Keep one URL, or point each version's canonical tag at the original page, send visitors to other versions with temporary 302 redirects, and end the test once you have a winner.

Need help with this?

Reach us instantly on WhatsApp, or send us a message and we will get back to you. On workdays we usually respond in less than 24 hours.

or send us a message