Browse all docs

Install the widget

Install on Wix

Add the SiteTrellis chat widget to Wix using Custom Code in site settings, including plan requirements, placement, and testing on the live site.

Last updated:

Wix lets you add a script to every page through its Custom Code feature. This requires a Premium plan with a connected domain; free Wix sites cannot run custom code. Wix updates its editors regularly, so the menu names below are a general guide. For anything that looks different, see the Wix Help Center.

Requirements#

  • A Wix Premium plan and a connected domain (Wix's own free wixsite.com addresses do not allow custom code in the way described here).
  • A SiteTrellis site with a published agent and the embed snippet. See the quickstart.
  • Your Wix domain listed in the SiteTrellis site's Allowed origins, for example https://www.example.com. If you also use the https://example.com form, add that too.

Add the snippet#

  1. In your Wix dashboard open Settings and find Custom code (in some versions it sits under Advanced).
  2. Click Add custom code (or + Add Custom Code).
  3. Paste the SiteTrellis snippet into the code box.
  4. Give it a name such as "SiteTrellis chat".
  5. Under Add code to pages choose All pages, and leave Load code once selected so it is not loaded again on each page navigation.
  6. Under Place code in choose Body - end.
  7. Click Apply, then publish your site.
<script src="https://cdn.sitetrellis.com/v/a44108d9c4521120/widget.js" data-site="site_xxxxxxxx" async></script>

Test on the live site#

The Wix editor and its preview mode generally do not run custom code, and they are served from different addresses than your live site. Always test on the published address (your connected domain) in a private browser window. If the launcher is missing there:

  • Check that you published the site after adding the code.
  • Check that the code status in Custom code is active (not paused) and that it applies to all pages.
  • Open the browser's Network tab and look for widget.js. If it loads but the config request is blocked, add the exact origin to the allowed list. See Troubleshooting.

Wix Studio, Editor X and Velo#

Wix Studio and the older Editor X use the same site-level Custom code setting. If you build with Velo (Wix's developer platform) you can instead add the script from page code, but the Custom Code setting is simpler and sufficient. Wix Stores, Bookings and member areas work with the widget on regular pages; some app-controlled pages (such as the checkout) may not run custom code. Test the pages that matter to you.

Identify members (optional)#

Telling the agent who is chatting needs a bit of Velo code to read the logged-in member, then a call to window.SiteTrellis('identify', {...}). This is an advanced step and the values are not verified. See Widget JavaScript API for the call. If you are unsure, skip it: the agent works fine for anonymous visitors, and it can ask for a name and email in the conversation.

Common issues#

SymptomLikely cause and fix
Option missing in SettingsThe site is on a free plan or has no connected domain. Upgrade and connect a domain.
Widget works on one domain onlyWix serves both the www and non-www hosts. Add both origins in SiteTrellis.
Two launchers appearThe code was added twice (for example once at head and once at body end). Remove one.
Widget appears but says it is unavailableNo published agent for this site, or the account is over its plan limit. See Billing and plans.
Help from Wix For the current location and wording of the Custom Code settings, search the Wix Help Center for "custom code".