Wix: Adding Custom Code to Product Pages
By the ZeDaq.ai team · · 4 min read
On this page
To add custom code to Wix product pages, open Settings in your site dashboard, choose Custom Code, add your snippet, select the pages and pick where it loads. Your site must be published and have a connected domain.
This guide uses Wix's own documentation, plus the ZeDaq.ai script as a worked example. For the wider picture of try-on on other platforms, see virtual try-on for WooCommerce, which uses the same script idea.
What is custom code in Wix?
Custom code lets you add a script to your site without editing a theme. Wix's support article on embedding custom code (checked November 2026) describes the steps and options.
Wix offers two routes. Custom Code is a dashboard setting for snippets. Velo is Wix's development platform, which Wix recommends for web applications or for elements that need to interact with the site.
How do you add a snippet step by step?
Per Wix's support article:
- Go to Settings in your site's dashboard.
- Under Development & integrations, click Custom Code.
- Click + Add Custom Code at the top right.
- Paste your snippet and give it a recognizable name.
- Under Add Code to Pages, choose all pages or specific pages.
- Under Place Code in, choose where the snippet goes.
- Click Apply.
Wix's article says your site must be published and have a connected domain. It does not mention a premium plan requirement, but check your own dashboard.
Where should the code load: head, body start or body end?
Wix offers three placements: Head, Body – start and Body – end. The article says tracking and verification codes generally belong in the head, and other functional scripts in the body. Always follow the instructions from the script's provider.
For a button script, the safest option is usually the body end, so the page content loads first. The ZeDaq.ai script uses the defer attribute, which also delays running until the page is parsed.
Can you add code to product pages only?
Yes. In Add Code to Pages, you can choose specific pages instead of all pages. For all-page snippets, Wix lets you load the code once per visit or on each page a visitor opens.
Be aware of two things:
- Dynamic product pages may count as one page type. Test a few products after applying.
- Wix notes that tracking tools such as Google Analytics and Facebook pixels don't work through custom code, and suggests marketing integrations for those.
How do you add the ZeDaq.ai widget to a Wix store?
The script-tag widget works on Wix and other platforms. Paste this into a custom code snippet:
<script src="https://www.zedaq.ai/widget/zedaq.js" data-key="YOUR_WIDGET_KEY" defer></script>
Then:
- Create a key in the ZeDaq.ai dashboard under API keys.
- Lock the key to your store's domain. Keys that aren't locked are refused.
- Paste the snippet into Custom Code and apply it to your product pages.
- Open a product page and check for the "Try it on" button and "Find my size".
The widget docs list optional attributes, such as data-garment-type. See the widget documentation for the current list.
If you haven't built your catalog yet, setting up a clothing store on Wix covers the basics. For other platforms, the guide to Squarespace code injection for product pages works the same way, and so does adding try-on to WooCommerce without a plugin.
What does it cost?
The Free plan costs $0 and includes 3 try-ons, 3 measurements and 5 invoices a month. Paid plans start with Micro at $14 a month, with the first month at $1 for a store's first paid plan, then $14 a month. Every paid plan has a 3-day free trial with no card required. See current ZeDaq.ai pricing.
How do you troubleshoot?
- Nothing appears. Confirm the site is published and the code is applied to the right pages.
- Domain error. Make sure the key is locked to the exact domain you use.
- Button in the wrong spot. Use the
data-targetattribute to place it inline. - Wrong product image. Use
data-product-imageto override it.
Developers who want more control can use the REST endpoint. See the try-on API for developers.
Add try-on and size help to your Wix product pages
FAQs
Do I need Velo to add a script to Wix?
No. Custom Code in the dashboard settings is enough for a script tag. Wix recommends Velo for web applications or elements that interact with the site.
Can I add code to only some pages?
Yes. Choose specific pages under Add Code to Pages.
Does Wix custom code work with tracking pixels?
Wix says tracking scripts like Google Analytics and Facebook pixels don't work through custom code. It suggests marketing integrations instead.
Is the ZeDaq.ai key safe to place in page source?
The key is visible in the page, so it must be locked to your domain. Unlocked keys are refused.
Try ZeDaq.ai free
Virtual try-on and Find my size for your store, plus client, order and invoicing tools for tailors, in one subscription.


