
Wix's Custom Code feature, under Settings → Custom Code, injects a raw HTML, CSS or JavaScript snippet into a page's <head> or <body>, on all pages or specific ones you choose — and Wix requires the site to be published and have a connected domain before the option works at all. It runs in every Wix editor, including Harmony, but it can't touch Wix's own APIs, page elements, or data collections — for that, you need Velo instead. Here's exactly what Custom Code does, sourced from Wix's developer documentation and help center, checked September 2026.
Wix's developer documentation states the location plainly: "You add custom code from the site dashboard under Settings > Custom Code" (Wix Developers, "About Custom Code", checked September 2026). Before you can use it, Wix's own note is direct about the requirement: "To add custom code, the site must be published and have a connected domain." A site still on its default free wixsite.com address, or one that's never been published, won't have this option available.
Wix's Editor-level walkthrough gives the exact click path and settings (Wix, "Wix Editor: Embedding Custom Code on Your Site", checked September 2026):
Wix's guidance on placement is straightforward: "the placement of your code is crucial for it to load and execute properly," and whichever third party supplied the snippet should tell you which of the three it needs.
Yes for where it's configured — Wix's developer docs state plainly: "Custom code can be used in all Wix editors." On Harmony specifically, which has no site-code layer at all, custom code carries more weight: "For Wix Harmony sites, which don't support site code, custom code is one of the primary ways to extend a site's functionality beyond what the editor provides." Wix's own "About Wix Harmony" page confirms the same boundary: "Wix Harmony doesn't support site code. If your projects require code customization, continue using Wix Editor or Wix Studio. However, you can use custom code to add HTML, JavaScript, and CSS snippets to Harmony sites" (Wix Developers, "About Wix Harmony", checked September 2026). Harmony also has its own separate Embed element for visible content, covered below.
Wix's documentation groups the realistic use cases into a few buckets:
<meta> tag search engines like Google and Bing require to confirm you own the site.<link> tag, overriding spacing or typography on standard HTML tags, or styling browser UI elements like scrollbars.LocalBusiness, FAQPage, or Event so search engines can render richer results.Several real limits, stated directly by Wix:
Wix also flags a security caution directly: custom code "is injected directly into the page's HTML and is visible to anyone who views the page source or uses browser developer tools. Don't include API keys, passwords, or other sensitive data in custom code snippets." A secret key belongs in backend code or a proxy, never in a head/body snippet.
They solve different problems. Custom Code is a site-wide dashboard setting that injects invisible script or style tags — Wix's Editor article confirms these "snippets are always invisible to your site visitors." The Embed element is a visible, on-canvas block instead: in Harmony, you add it from Add Elements → More Options → Embed, then choose either Embed code (paste HTML for a widget) or Embed a site (show an external HTTPS page inside your page) (Wix, "Wix Harmony Editor: Embedding a Link or HTML Code", checked September 2026). Wix's Custom Code FAQ draws the same line: "How do I embed visible code on my site? Add an iFrame with HTML code to display visual content on your site." In short — Custom Code for invisible head/body scripts that affect the whole page, Embed for one visible widget placed like any other canvas element.
Right where Custom Code's limits stop, by Wix's own framing: Custom Code and Velo (Wix's site-code layer) "serve different purposes." Wix's developer documentation lays out the split directly:
| Custom code | Site code (Velo) | |
|---|---|---|
| Purpose | Inject standalone code snippets | Build integrated site functionality |
| Access to Wix APIs | None | Full access to Wix APIs, elements, and data |
| Wix Harmony support | Yes | No |
| Runs on | Browser only | Browser and backend |
If what you need is to read or write your site's own data collections, respond to a Wix event (like a completed booking or a new form submission) with custom logic, or call an outside API from a place where a secret key stays hidden, that's Velo, not Custom Code — and Velo isn't available on Harmony at all. Our guide to what Velo actually is and what code runs where covers frontend page code, backend web modules, and the database access Velo gives you, without repeating the Custom Code details above. If you're not sure which editor your site is on to begin with, our Wix Harmony vs. Wix Editor vs. Wix Studio guide covers how to check.
Wix's FAQ flags a real recovery-path detail before you switch domains: "Your code snippets are associated with a specific domain. If you assign a different domain to your site, your code snippets will be deleted." Back up any working snippet's text outside Wix first, since there's no restore step afterward — you'd be pasting it back in from scratch.
Custom code also "doesn't take effect in the editor and only runs on the published site," so previewing in the editor won't show it. Check with your browser's developer tools instead — page source, applied styles, or console output on the live site — and for structured data specifically, Google's own Rich Results Test to confirm JSON-LD is detected and valid.
Not directly — Figment publishes a static site from a Figma design through its Figma plugin, and it has no Settings-level Custom Code panel, Embed element, or Velo layer to compare against what's described here. If a Wix site's reason for needing custom code is a specific tracking pixel, use Marketing Integrations as Wix documents above rather than Custom Code; if it's data, bookings, or backend logic, that's Velo's job, and it's worth checking our free-plan guide too, since a free wixsite.com site can't use Custom Code at all until it's upgraded and has a connected domain.
Bottom line: Wix's Custom Code lives at Settings → Custom Code, injects HTML/CSS/JS into a page's head or body on a published site with a connected domain, and works the same way across the Editor, Studio, and Harmony — but it can't touch Wix's APIs, data, or tracking-pixel integrations, and it runs only in the browser. Use the Embed element instead for a visible on-page widget, Marketing Integrations for GA4 or ad pixels, and Velo once you need real access to your site's data or backend logic.