top of page

Wix Editor: Embedding Custom Code on Your Site

7 days ago
4 min read

Updated: 6 days ago

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: Head, Body – 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.


Add an iFrame with HTML code to display visual content on your site. If you want your site's elements to interact with your site, and for more advanced features such as building web applications, head to Velo by Wix.


Your code snippets are associated with a specific domain. If you assign a different domain to your site, your code snippets will be deleted. There is no need to add code snippets to your secondary domain, as all traffic is redirected to your primary domain.


To help your site be compliant with privacy laws such as the GDPR, we recommend you categorize your custom code. This helps manage and control the data collected through your site.


The placement of your custom code depends on the instructions provided by the third party from which you received the code. Generally, place tracking and verification codes in the head section, and other functional scripts in the body section. Always follow the third-party provider's instructions for optimal performance.


Wix does not provide support for technical problems with third-party code snippets. Contact the provider directly for assistance if you encounter any issues.


Yes, when adding custom code to all pages, you can choose to load the code only once per visit or on each page your visitor opens. Select the appropriate option under Add Code to Pages.


For more advanced features such as building web applications or if you need your site's elements to interact with your site, use Velo by Wix. Velo provides tools and APIs to help you create complex, dynamic web applications.


The best way to find the snippet causing the issue is to disable each snippet’s toggle one at a time and test your site after each change.

Wix Editor: Embedding Custom Code on Your Site

In December 2025, Wix introduced new frontend security measures for custom code on Wix sites. This means that some code snippets that previously worked may now be blocked until the provider updates them.

This change affects all types of custom code, including dashboard custom code, embedded code, and Velo code.

If the provider identifies this as a Wix-related issue, you can share the Wix Developers documentation on frontend security with them for review, so they can make any necessary updates to their code.



This article is credited to the Wix team - https://support.wix.com/ and we thank them for that!

Comments


lord_of_the_wix

© 2027 BY LORD OF THE WIX

©
bottom of page