Wix Editor: Embedding Custom Code on Your Site

3 min read
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.
In this article, learn more about:

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 Advanced 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: Use the drop-down menu to select the relevant pages.
  7. Choose where to place your code under Place Code in:.
    • Head
    • Body - start
    • 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.

Did this help?

|