Third-party tools

Load a vendor's script through Benson instead of your theme, choose where it runs with rules, and measure what it adds with a holdout.

Guide
Updated 10 October 202620 min read
Jump to a section

Many stores run third-party apps on their storefront: reviews, live chat, trust badges, student and key-worker discount widgets, upsell pop-ups. Every vendor says theirs lifts sales, and very few of those numbers come from your store. Tools lets you check.

For the short version, with what each step looks like, see Tools.

What Tools does#

You move a tool's script tag out of your theme and into Benson. From then on, Benson decides on every page view whether to load it:

  • By your rules. Load it only where it's worth it: paid traffic, the evening, the UK, product pages, shoppers without a coupon extension. The rules are the same ones the pop-up blocker uses.
  • By a measurement. Hold the tool back from a random share of shoppers for a planned period, then see what it added to their orders, and whether the vendor's claim holds up.

Benson also notes which tools it loaded on every session and, where the shopper's consent allows, on the cart and the order, so an order can say "Reviews widget on".

Benson only loads what you give it. It never blocks, hides or changes a script it wasn't given, so a tag you leave in your theme keeps loading exactly as before. That's also why it works with any vendor whose install is a script tag, the same thing Google Tag Manager relies on, without knowing anything about the vendor.

Once a tool is in Benson, it loads only when Benson does. If you pause Benson, turn off its app embed or uninstall it, the tools you moved stop too. The limits at the end of this page list every case.

Loading tools, with rules, is on every plan. Measuring a tool needs Stop or above.

Moving a tag into Benson#

Moving a tool takes three steps: find the vendor's code, paste it into Benson, then remove it from your theme.

Find the vendor's code#

There are two places to look.

  1. The vendor's install instructions. Most vendors have a "manual install" or "add this code to your site" option, in their help pages or in the app's settings. Copy the whole snippet.
  2. Your page source. Open a storefront page where the tool runs, view the page source (in Chrome, right-click and choose View page source) and search for the vendor's domain. Copy the <script> tags that load from it, together with any short inline script beside them that sets the tool up, often a single window.something = … line.

Before you paste, check the copied code for values that change from page to page or shopper to shopper: a product id, a price, a customer's id or email, what's in the cart. Your store's templates fill those in (Liquid, on Shopify), and a tool in Benson loads the same code on every page, so a tool that depends on them can't move. Values that are the same everywhere, such as your store's domain or a public account key, are fine.

Paste it into Benson#

In your dashboard, go to Grow → Tools and choose Add a tool. Give it a name. Benson turns the name into the tool's key, such as reviews_widget for "Reviews widget". The key is what orders, the JavaScript API and the dataLayer use, and it never changes, even if you rename the tool later.

Paste the code under Paste your vendor's code. Say the vendor gave you this:

<script>
  window.reviewsConfig = { shop: "your-store" };
</script>
<script src="https://widget.reviews.example/loader.js" data-shop="your-store" async></script>
<div id="reviews-badge"></div>

Benson keeps both scripts, the loader's async and data-shop attributes included, and tells you that the <div> stays in your theme.

What the preview shows#

As you paste, the preview shows what Benson will load:

  • Domains. Every domain the tool loads scripts from. Check they're the vendor's.
  • Scripts. Up to five, loaded one after another in the order you pasted them, each once the one before it has loaded.
  • Dropped attributes. Inline event handlers such as onload can't move into Benson. If the vendor's code relies on one, ask them whether the tool starts without it. Benson also drops nonce, because it adds your page's own, and any attribute it doesn't support. It keeps id, crossorigin, referrerpolicy, charset, integrity, data- attributes, async, defer, type="module" and nomodule.
  • What stays in your theme. Anything that isn't a script: the element a widget draws into, a <noscript> fallback, styles and links. Leave those where they are. Only the scripts move.
  • Problems to fix before saving. A script address that starts with http:// (use its https:// address), an inline script over 4KB, more than five scripts, or integrity without crossorigin. A consent manager can't be a tool at all: it has to load before Benson, so it stays in your theme.
  • Warnings. A script domain your Content Security Policy doesn't allow, from your latest site scan, and a copy of the tag still loading from your theme.

The next steps set Where the tool loads (its rules) and How:

  • When it loads: early, as soon as Benson starts, or once the page has finished loading, for tools nobody needs straight away, such as a chat button.
  • Where its scripts go: the page's head or the end of its body.
  • For the rest of the visit: once a tool has loaded, it keeps loading on that visit's later pages. This is on by default.
  • Its consent purpose, and whether it may load on account pages.

Prove it, the last step, starts a measurement. You can skip it and start one later.

Only the store's owner can add a tool, change its code, turn a switched-off tool back on, loosen its consent purpose or allow it on account pages, and only within 15 minutes of signing in: Benson asks you to sign in again otherwise. Admins can change everything else, and switch a tool off. Each of those owner changes emails every owner and admin with the full script addresses and a button to switch the tool off. In the Benson app inside your Shopify admin, tools are read-only; make changes in the Benson dashboard.

You can switch a tool on once Benson is live on your store.

Remove it from your theme#

Switch the tool on in Benson first, then remove the theme's copy straight away. Until you do, your pages load the tool twice.

Shopify

  • Installed as an app embed: go to Online Store → Themes → Customize → App embeds, switch the vendor's embed off, and save. If the embed had settings the tool needs, such as its position or colours, check the widget still looks right. If it doesn't, the tool depends on the embed and is better left there.
  • In your theme code: go to Online Store → Themes, open the theme's menu and choose Edit code. Open layout/theme.liquid (or the snippet it renders the tag from), delete the vendor's <script> tags, and save. Keep anything the preview said stays in your theme.
  • In neither: the app probably adds its script through Shopify itself, which you can't edit. Look in the app's settings for an option to turn off its storefront script, or ask the vendor. If there isn't one, leave the tool in your theme.

App blocks, the sections an app adds in the theme editor, stay where they are.

WooCommerce

The tag usually comes from the vendor's plugin, a header and footer plugin, or your theme's header.php or footer.php. Remove it where it was added: turn off the plugin's option to add its script, delete it from the header and footer plugin, or delete it from the theme file. Edit a child theme, so a theme update doesn't put it back. If the vendor's plugin adds its script with no way to turn it off, leave the tool in your theme.

Other sites

Delete the tags from your page template or layout. If Google Tag Manager loads the tool, pause or delete that tag and publish the container.

Why a leftover copy spoils a measurement#

A measurement compares shoppers Benson loaded the tool for with shoppers it held the tool back from. If your theme still loads the tool, the held-back shoppers get it anyway. Both groups see it, and the measurement can only report that it makes no difference.

Benson checks for this. On pages where it didn't load a tool, for held-back shoppers and on pages your rules leave out, it looks for scripts from the tool's domains once the page has loaded, and again five seconds later. If it finds one, the tool's page warns that the tag is still in your theme. Starting a measurement within a day of that warning asks you to confirm first. If more than one in 50 held-back visits still find the tag, the results are marked as contaminated and the vendor's claim isn't checked.

Benson never removes the theme's copy itself. It reports it, and you remove it.

Rules#

Without rules, a tool loads on every storefront page except payment, password and account pages. Rules narrow that down. Tools use the same rule builder as the pop-up blocker and your offers' targeting, and every rule reads back as a sentence on the tool's card.

You can combine device, UTM parameters, referrer, URL parameters, time of day, season, country, new or returning visitors, basket value, coupon extensions and traffic, then choose the pages: page types such as product or cart pages, or addresses.

Examples#

You want itSetThe card reads
For paid traffic onlyTraffic: paidTraffic is paid, on every page
In the eveningTime: every day, 20:00 to 22:00, store timeTime is every day 20:00–22:00 (store time), on every page
In the UK onlyCountry: United KingdomCountry is United Kingdom, on every page
On product pagesPages: product pagesEveryone, on product pages
Not for coupon-extension shoppersCoupon extension: not detectedNo coupon extension is detected, on every page

Three things to know:

  • Some rules wait for an answer. Country, basket value and coupon extensions need information Benson has to look up or detect, so the tool loads once it's known. A coupon-extension rule can hold a tool back for up to three seconds while Benson checks.
  • "For the rest of the visit" outlasts page rules. With it on, a tool that loaded on a product page keeps loading on that visit's later pages, product pages or not. The rule decides where a visit's tool starts. Switch the option off if the rule should apply page by page.
  • Payment pages always win. No rule can load a tool on a payment or password page. See Limits.

Groups#

At the top, a tool matches all of its conditions or any of them. For anything in between, add up to five groups, each with up to ten conditions and its own all or any.

Say you want the tool for UK shoppers on product pages who came from a Google ad or from an affiliate. Match all of: country is United Kingdom, and a group that matches any of: paid traffic from Google, affiliate traffic. Then choose product pages. The card reads "Country is United Kingdom and (Traffic is paid from Google or Traffic is affiliate), on product pages".

How Benson spots paid and affiliate traffic#

Benson decides from the page a visit lands on, and keeps the answer for the whole visit, new tabs included.

  • Paid: a Google click id (gclid, gbraid or wbraid), a Microsoft one (msclkid) or a TikTok one (ttclid), or a utm_medium of cpc, ppc, paid, paid_social or paidsocial. With a UTM, the network comes from utm_source: google; facebook, fb, instagram, ig or meta for Meta; bing or microsoft for Microsoft; tiktok; anything else counts as another network.
  • Affiliate: an Awin (awc), Impact (irclickid), CJ (cjevent) or ShareASale (sscid) click id, or a utm_medium of affiliate or affiliates.
  • Not fbclid alone. Meta adds it to clicks from ordinary posts as well as ads, so it can't tell you a visit was paid. Tag your Meta ads with a paid medium, such as utm_medium=paid_social, so their visits count.

Leave a traffic rule's network list empty to match any network.

Give each tool the consent purpose your cookie banner and privacy policy file it under. If you're not sure, ask the vendor what the tool stores.

PurposeUse it forBenson reads it from ShopifyFrom Google Consent Mode
NoneTools that store nothing about the shopperNot neededNot needed
AnalyticsTools that measure how shoppers use your storeanalyticsProcessingAllowed()analytics_storage
MarketingAdvertising, retargeting and ad pixelsmarketingAllowed()ad_storage and ad_user_data
PreferencesTools that remember a shopper's choicespreferencesProcessingAllowed()functionality_storage

Benson reads the purpose from your banner itself: Shopify's Customer Privacy API, Google Consent Mode, an IAB TCF banner, or on WooCommerce the WP Consent API, which Benson for WooCommerce passes on. A tool loads as soon as the shopper grants its purpose, including later in the same page view if they accept the banner then.

If Benson can't see a signal for the purpose, the tool doesn't load. A tool set to marketing, on a store whose banner never says anything about marketing, would never load. The tool editor warns "Benson can't see your consent banner" when that's likely. A tool set to None loads without waiting for consent, so keep None for tools that really store nothing. When you paste a known ad pixel, Benson picks marketing for you.

Consent also decides who can be measured.

Measuring a tool#

Measuring needs Stop or above. If your store goes over its session quota, measurements stop and your tools keep loading.

What a holdout is#

When you start a measurement, Benson picks a random share of the shoppers your rules match and never loads the tool for them: the holdout. Everyone else gets the tool as usual. Both groups shop over the same weeks, through the same promotions and the same weather, so the difference in what they buy comes down to the tool.

A shopper keeps their group for the whole visit, across tabs and even if their consent changes part-way through, and on later visits too.

Who is measured#

Only shoppers Benson can follow to an order. That needs an anonymous visitor id, which Benson keeps only when the shopper's consent allows it (or where consent isn't required), and the same consent lets it note the visit's group on the cart. Shoppers Benson can't follow get the tool as your rules say. They're never held back and never counted.

So if most of your shoppers decline cookies, a measurement takes longer, and the planner counts only the shoppers it can measure.

Benson remembers a measured visitor's group, so an order they place on a later visit still counts for their group, whatever page they buy from. Test links never count: they load tools by your rules but never hold one back. In Shopify's theme editor, Benson loads every switched-on tool, with no rules and no measurement, so you can see them while you edit.

Planning a measurement#

In Prove it, choose how many shoppers to hold back (one in twenty, one in ten, one in five, or half) and for how long (14, 28, 56 or 120 days). Each option shows the smallest change it can detect, worked out from your store's last 28 days: how many measurable visitors match the tool's rules, how often they buy, and how much their order values vary. Benson can't replay basket or coupon-extension rules against past visits, so with those rules the numbers are marked as an estimate.

Holding back more shoppers, or measuring for longer, lets you see smaller changes. Holding back more also costs you more while it runs, if the tool helps. The planner recommends the smallest share, then the shortest length, that can see a reasonably small change, and suggests half for 120 days when nothing shorter can.

Two more choices before you start:

  • Start without rules. You learn what the tool does across your store. If it only matters to some shoppers, such as students or NHS staff, its effect across everyone is that much smaller, so a tool can look flat overall and still help a group. Where it helps points at those groups.
  • Add the vendor's claim. Enter the lift the vendor quotes, as a change in conversion rate or in revenue per visitor, and Benson checks it at the end.

A store can run up to five measurements at once.

Why there's no verdict until the end#

A measurement runs for the length you planned. Until then, the tool's page shows the running difference between the groups, with its range, for both conversion rate and revenue per visitor, under "Early numbers move around". It shows nothing else: no verdict, no claim check, no money figure, and no email.

We built it that way on purpose. Early numbers swing about, and if you check every day and stop the first time a tool looks good, you'll keep plenty of tools that do nothing. Fixing the length up front and deciding once, at the end, keeps the answer honest.

You can extend a measurement once, up to 120 days in all. If you stop it early, its numbers stay on the page marked "stopped early", with no verdict.

Reading the result#

At the planned end, Benson decides once, emails you, and puts the tool back for every shopper your rules match.

  • Adding revenue or costing revenue: it's at least 19 in 20 likely that one group did better on the measure you chose, conversion rate or revenue per visitor, and the likely cost of being wrong is small.
  • No clear difference: anything else. Any effect is smaller than the measurement could see, which isn't the same as no effect.

The claim check compares the vendor's claim with the range the data allows. Either the data rules the claim out because the tool adds less, or the tool beats the claim, or the claim sits inside the range, and Benson says it can't tell. Every check carries the same note: "Vendors often quote results among shoppers who used the tool. Benson compares everyone it loaded for with everyone it was held back from." Shoppers who click a widget were often going to buy anyway, so a comparison of the shoppers who used a tool with the ones who didn't answers a different question.

The money figure reads "About £X a month for everyone it loads for", with a range, labelled "extra revenue after discounts, before costs and refunds". It's the difference in revenue per visitor between the groups, across every visitor in the measurement, per month. It doesn't take off the tool's fee, your costs or refunds, and it leaves out the shoppers Benson couldn't measure. When the range includes zero, it reads "No clear money effect yet". When it's clearly positive, it adds what the held-back group cost you each month while the measurement ran: "Holding it back costs about £Y a month".

Two flags can stop the claim check. A result is contaminated when the tool's tag is still in your theme for more than one in 50 held-back visits (see leftover copies), and suspect when more than one in 100 attributed orders name a group the visitor wasn't in.

The breakage alarm#

A tool can break a page: a script error that stops the page working, or a widget covering the add-to-cart button. So while a measurement runs, Benson watches for revenue per visitor with the tool at least a fifth lower than without it, at least 19 in 20 likely. It starts checking once each group has 30 buyers and the measurement has run for three days.

If the alarm goes off, the tool's page flags it and you get one "needs a look" email. Nothing else changes: the measurement keeps running, and the decision is yours. Check the tool on your store, then stop the measurement or switch the tool off if you find a problem.

Changing a tool during a measurement#

Changing a tool's code, rules, placement, timing or consent purpose changes what's being measured, so Benson asks before saving, then ends the current measurement and starts a new one. The new one keeps the same split, so returning visitors stay in their groups. Switching the tool off stops the measurement.

The tool's page keeps every past measurement, with the settings the tool had when it started.

Tools you can't measure this way#

Ad pixels, analytics tags and tag managers can load through Benson with rules, but Benson won't measure them. Their value shows up in your ad platforms and analytics, not in this store's orders, so holding one back would only cost those platforms data.

Where it helps#

Where it helps splits a measurement by traffic (paid, affiliate or other), by device, and by four parts of the day, showing revenue per session for each group with a range. Rows with fewer than 30 buying sessions in either group are hidden.

We show it as a pointer, not a verdict. Slice any measurement enough ways and some slice will look good by chance. Use it to choose rules, then measure again. A row that's clearly up or down offers Load only here or Don't load here, which opens the rule builder with that rule filled in and starts a new measurement when you save.

What "on" means on an order#

When Benson loads a tool in a visit, it adds the tool's key to the visit and, if the shopper's consent allows, to the cart. On Shopify that's the _benson_tools cart attribute, which the order keeps. On WooCommerce, Benson for WooCommerce saves it on the order.

An order marked "Reviews widget on" means Benson loaded the reviews widget during that visit. It doesn't mean the shopper saw it, clicked it or used it. Orders from held-back shoppers are marked "Reviews widget held back".

The tool's page also counts sessions it loaded in and orders with it on over the last 30 days, labelled "With it on, not proof". Shoppers who get a tool differ from shoppers who don't, so those counts describe; only a measurement says what the tool adds.

In the JavaScript API and dataLayer#

  • Benson.state().tools lists the keys of the tools Benson loaded in this session, and Benson.state().x holds the session's experiment and measurement groups.
  • Benson.on("tool_on", …) hears each tool as it loads, and Benson.on("state", …) hears when either of those changes.
  • The dataLayer's benson_state event carries benson_tools, the session's loaded tools, on every page.
  • Every script Benson adds for a tool carries data-benson-tool with the tool's key, so you can find them in your browser's developer tools.

The JavaScript API and dataLayer references have the details.

Limits#

  • A moved tool starts a moment later than a hard-coded tag. Benson loads its own script and your store's settings first, and waits for your consent banner's answer if it hasn't come yet. We'd keep anything that must run before the page appears, such as a consent manager or a page-hiding A/B test, in your theme. If a widget pushes content down when it appears, give the space it fills a fixed height in your theme.
  • Payment, password and account pages are skipped. Benson never loads a tool on checkout and payment pages, password pages, or any page with a card number field. Account pages are skipped too, unless you allow them for a tool. On a custom-built store, you confirm your checkout and payment addresses before you can switch a tool on.
  • Single-page stores keep a loaded tool running. If your store moves between pages without reloading and calls Benson.page(), a tool that loaded keeps running after the shopper moves on, even to a page its rules leave out. Benson loads newly matching tools on each page, but it can't unload a script.
  • Some installs can't move. An app that only adds an app block, with no script tag, renders on Shopify's servers, so there's nothing for Benson to load. An install that depends on Liquid data, such as the current product or customer, can't move either, because Benson loads the same code on every page.
  • If Benson doesn't load, neither do your tools. That includes pausing Benson, switching off its app embed, uninstalling it, a Content Security Policy that blocks it, and a shopper's ad blocker or privacy filter blocking it. A tool that has to load on every visit belongs in your theme.
  • Switching a tool off takes a moment. It stops within about 60 seconds, plus one page view, as your pages pick up the change.
  • Each tool loads on its own. A script that hasn't loaded after 10 seconds is reported as a load error, and the rest of that tool is skipped. Other tools never wait for it.
  • Your Content Security Policy still applies. Allow the vendor's domains as you did when the tag was in your theme. A blocked script shows as a load error on the tool's page. If your policy uses a nonce, Benson copies it from its own script tag onto the tool's scripts.
  • Inline code can't write into the page. It runs after the page has loaded, when document.write would wipe it, so Benson ignores the call and reports it as a load error.
  • Sizes. Up to 10 tools per store, five scripts per tool, 4KB per inline script, and https:// addresses only.

Stuck? Email [email protected].

Find out what's leaking. 14 days of Own, no card.