Install Benson with one snippet

Paste one script tag into every page of your store. Works on any platform, including custom and headless builds.

Install
Updated 26 September 20261 min

Benson is one small script (about 2.5KB compressed) that loads asynchronously and never blocks your page. Paste it once, into the part of your template that renders on every page.

Your snippet#

Your real snippet, with your site key, is in the setup wizard and under Site settings → Install:

<script async src="https://cdn.trybenson.com/benson.js" data-site="pk_live_YOUR_SITE_KEY"></script>

Where to paste it#

Put it inside <head>, as high as you comfortably can, on every page including product, cart and checkout pages. On most platforms that's a layout or header template.

  1. Open the template that renders every page of your store (often a layout or header file).
  2. Paste the snippet right before the closing </head> tag.
  3. Deploy, then open your store once so Benson can say hello.

There are step-by-step guides for WooCommerce, Magento, BigCommerce, Wix and Squarespace.

Check it's live#

Open your store in a normal browser tab. The setup wizard shows Verified: Benson is live within a few seconds of the first page view. If your store sends a Content Security Policy header, allow Benson's hosts first: see CSP.

Single-page apps and headless stores#

The script handles the first page load on its own. If your storefront changes pages without a full reload, call Benson.page() after each navigation, and give Benson the cart with Benson.setCart(). See the JavaScript API.

Stuck? Email [email protected].

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