Install Benson on Ecwid
Add the Benson snippet to your Ecwid Instant Site's header code, or to the site your Ecwid store is embedded in, and check it's live.
Jump to a section
Benson runs on Ecwid through one script tag in your site's header. Choose Other as your platform in the setup wizard.
Your snippet#
Your real snippet, with your site key, is in the setup wizard and under Settings → Install:
<script async src="https://cdn.trybenson.com/benson.js" data-site="pk_live_YOUR_SITE_KEY"></script>Add it to your Ecwid Instant Site#
- In your Ecwid admin, go to Website (or Overview → Manage Instant Site).
- Scroll to SEO settings and click Add Code under Header meta tags and site verification.
- Paste the snippet and save, then refresh your site.
Header code on Instant Site requires the Venture, Business or Unlimited plan.
Tell Benson when the store page changes#
Ecwid moves between product, cart and checkout pages without reloading, so tell Benson each time. In the same Website settings, scroll to Advanced website settings, click Add Code under Custom JavaScript code, and save this:
<script>
var bensonFirstPage = true;
Ecwid.OnPageLoaded.add(function () {
if (bensonFirstPage) { bensonFirstPage = false; return; }
if (window.Benson) Benson.page();
});
</script>
Benson counts the first page itself, so the code skips it. See the JavaScript API for more.
Ecwid embedded in another site#
If your Ecwid store sits inside another website (WordPress, Wix, Squarespace or your own build), add the snippet to that site's head on the pages that show your store. Add the page-change code after the Ecwid store code. The snippet guide and the Wix and Squarespace guides show where.
Check it's live#
Open your store in a normal browser tab. The setup wizard shows Verified: Benson is live within a few seconds. If it doesn't, see Troubleshooting.
Good to know#
Ecwid's cart and checkout run inside your store page, so the snippet reaches them too. Benson hides extension pop-ups and guards the coupon field until a shopper leaves for an outside payment page.
Stuck? Email [email protected].
