Site-wide widgets on Wix
Wix gives you two ways to add code, and for a floating widget only one of them works. The Embed > HTML element puts your code inside an iframe: a sealed box, fixed size, that the widget cannot escape. A chat bubble placed there sits in a rectangle in the middle of your layout instead of pinned to the corner of the window, and a popup covers only its own box rather than the page. Custom Code, under Settings, is different — it injects the script into the actual page HTML, so `position: fixed` means what it says and the widget behaves the way it does everywhere else. Custom Code is a Premium feature and needs a connected domain, which is the one real gate here; the HTML element is available on free sites but cannot do this job.
Build and style the widget in the Zyff widget builder, then follow the Wix steps below to put it on every page.
How to add a site-wide widget to Wix
Build the widget and copy the code
Set the widget up in any Zyff builder and copy the embed code — one <div> and one <script> tag. Copy the whole thing; both lines matter.
Open Settings > Custom Code
From your Wix dashboard go to Settings, then Custom Code (under Advanced in some accounts; Wix Studio keeps the same panel under the site's settings). This is a different screen from the Embed element in the editor — make sure you are in the dashboard, not the editor.
Add the code to Body - end
Click + Add Custom Code, paste the snippet, and give it a name you will recognise later. Under “Add Code to Pages” choose All pages, and set “Load code on each new page” rather than once, so the widget re-mounts as visitors move between pages. Under Place Code in, choose Body - end.
Apply and publish
Click Apply, then publish the site. Custom Code does not run in the Wix editor's preview at all, so there is nothing to see until the site is live — checking the preview and concluding it is broken is the most common wasted hour here.
Check the published site on a phone
Open the live URL, not the editor. Confirm the widget floats over your content rather than sitting in a box, and check a second page to be sure the All pages setting took.
Wix-specific things worth knowing
The HTML element cannot do this
Embed > HTML creates an iframe with fixed dimensions. A floating widget inside it is trapped in that rectangle: it cannot pin to the window corner, cannot cover the page, and gets its own inner scrollbar. Custom Code injects into the page itself, which is the whole reason it is the right panel.
Custom Code needs Premium and a connected domain
The panel is unavailable on a free Wix site, and it stays unavailable on a Premium plan until a domain is actually connected. If Settings > Custom Code is greyed out or missing, that is almost always why.
Nothing runs in the editor preview
Wix strips custom code from preview mode entirely. Judge the result from the published site only — the editor showing nothing is expected behaviour, not a fault.
Choose “load on each new page”
Wix navigates between pages without a full reload in many templates. Loading the code once means the widget mounts on the first page a visitor lands on and is absent from every page they click through to.
Nothing needs installing from the App Market
This is a script tag, not a Wix app. There is no app to add, no permissions to grant, no monthly app charge, and nothing that stops working if you later remove an app.
Free sites carry Wix's own banner
A free Wix site shows Wix's promotional bar regardless of anything you add. It is unrelated to the widget, but it does sit in the same corner of the screen — move the widget to the other corner if the two collide.
Widgets that belong on every page
Frequently asked questions
How do I add a script to every page on Wix?
Dashboard > Settings > Custom Code > + Add Custom Code. Paste the snippet, set it to All pages, choose “load code on each new page”, place it in Body - end, apply, and publish. This is a different screen from the Embed element in the editor.
Why is my floating widget stuck in a box?
You used Embed > HTML, which wraps the code in an iframe it cannot escape. A floating chat button, popup or announcement bar has to go through Settings > Custom Code, which injects into the real page.
Why can't I find Custom Code in my settings?
It is a Premium feature and it also requires a domain to be connected to the site. On a free plan, or on a Premium plan with no domain attached yet, the panel is hidden or disabled.
It works on the homepage but not on other pages.
Two likely causes: the code was added to a specific page rather than All pages, or it was set to load once instead of on each new page. Wix moves between pages without a full reload, so “once” means it never re-runs.
Nothing shows in the Wix editor preview.
That is expected. Wix does not run custom code in preview. Publish the site and open the live URL — there is no way to see it beforehand.
Do I need Velo?
No. Velo is for writing your own site code, and this is a plain script tag. Custom Code handles it with nothing enabled and no developer mode.