header-logo
Getting started with WixBuild your website and business with Wix. Try using our AI tools to create your website, customize templates, or hire professionals to build or enhance your online presence.
Creating a websiteRead how to use the Wix Editor and manage content on your site. Discover how to protect your visitors' privacy and make your site accessible.
Account & billingReview your account settings, manage your subscriptions and plans and understand your invoices.
Using the Wix mobile appsUse our mobile apps to run your business efficiently on the go and set up a dedicated app for your site members to stay in touch.
Connecting a domainFollow our step-by step guides to learn how to purchase, connect or transfer a domain for your site, and find out how to keep your site’s data secure.
Managing your businessGet tools to grow your business and web presence. Find the right tools for your specific needs, set up online payments and keep track of your site's analytics.
Promoting your siteLearn to make your site more visible promoting it on search engines, sending emails and running paid ads. Improve your online presence with practical tips.
Studio, Partners & EnterpriseGet the most out of your Studio or Enterprise account with advanced features that'll help you work more efficiently.
Need more help?Find solutions for site performance and technical issues, learn about issues we’re working to fix or contact us for help.
placeholder-preview-image
Wix LearnImprove your skills with our courses and tutorials.
Wix BlogGet tips for web design, marketing and more.
SEO Learning HubLearn to increase organic site traffic from search engines.
Website developmentBuild a custom site using our full-stack platform.
Hire a ProfessionalGet matched with a specialist to help you reach your goals.
placeholder-preview-image
In this article
  • Adding custom code to your site
  • Working with third-party code
  • FAQs

Wix Editor: Embedding Custom Code on Your Site

In this article
  • Adding custom code to your site
  • Working with third-party code
  • FAQs
Embed custom code snippets to the head or body of your site's pages to verify site ownership, monitor your site's traffic, track user activity, and measure the success of your campaigns.
When adding the custom code, you can choose to include it on all your site's pages or specific pages only. Whichever you choose, these snippets are always invisible to your site visitors.
Important:
  • Wix does not provide support for technical issues with third-party code snippets. If you have an issue with your code snippet, please contact the provider directly.
  • Tracking scripts such as Google Analytics, Google Tag Manager, and Facebook & TikTok pixels do not work through custom code. You can connect these to your site with marketing integrations.

Adding custom code to your site

Before you begin:
Make sure that your site is published and has a connected domain.

To add custom code to your site:

  1. Go to Settings in your site's dashboard.
  2. Click Custom Code in the Development & integrations section.
  3. Click + Add Custom Code at the top right.
  4. Paste the code snippet in the text box. 
  5. Enter a name for your code.
    Tip: Give it a name that is easy to recognize so you can quickly identify it later. 
  6. Select an option under Add Code to Pages:
    • All pages: This adds the code to all of your site's pages, including any new pages that you create in the future. 
      • Choose whether to load the code only once per visit, or on each page your visitor opens.
    • Choose specific pages: Click the drop-down menu to select the relevant pages.
  7. Choose where to place your code under Place Code in: HeadBody – start, or Body – end.
  8. Click Apply.

Working with third-party code

When you get a code snippet from a third party, they should give you instructions about where to place the code (head or body) and how to use it. The placement of your code is crucial for it to load and execute properly. 
Wix does not provide support for any technical problems you may have with third-party code snippets. If you have a problem with a code snippet from a third party, you should contact the provider directly for help.

FAQs

Click a question below to learn more about embedding custom code on your site.

Helpmate

Hello

Need a bit more guidance?
Unlock personalized helpLog in to get the most out of Helpmate.