Knowledge base
Guides
Academy
Video tutorials
Try searching for:
Recently viewed articles:

Table of contents

Adding custom code to Instant Site

Custom code allows you to verify Instant Site ownership and add a wide variety of new elements and content like chat or contact form widgets to your Ecwid website. You can also integrate third-party services (e.g., booking) with Instant Site this way.

There are two places on Instant Site where you can add code: the header section and the body section.

Choosing where to add code

When choosing between Instant Site’s header and body as a place to add your custom code, consider the code itself and your use case.

Generally, implementing JavaScript to the site body is recommended as it’s better in terms of page speed. However, there are cases (e.g., domain ownership verification) when your code must be added to the header section.

Make sure you read the instructions for the third-party code/widget that you want to add to your Instant Site for tips on where it’s best to add this particular piece of code.

Adding code to the head section of your Instant Site

Inserting code into Instant Site header is your option if you need to verify site or domain ownership (e.g., when selling or advertising on Facebook). You can add multiple codes to the header section.

To add a custom code to the Instant Site head section:

  1. From your Ecwid admin, go to Website (or to Overview → Manage Instant Site).
  2. Scroll down to the “SEO settings” section and click Add Code under Header meta tags and site verification:
    Adding_custom_code_to_Instant_Site__2_.png
  3. In the appeared field, enter your code.
  4. Save the changes.

Refresh the Instant Site page in your browser to see the changes.

Adding code to the body section of your Instant Site

Inserting code into the Instant Site body is your option if you need to implement any custom script. For example, you want to have a Zendesk chat window or a contact form widget on your website. You can add as many codes to the body section as you need. Please note that the content will appear at the bottom of the <body> section of the site, so most likely at the very end of your site.

In case you need to place additional content somewhere other than the bottom of the site, consider creating a request to the Ecwid Customization team. They'll provide assistance and determine whether they can develop a tailored solution for you.

To add a custom code to the Instant Site body section:

  1. From your Ecwid admin, go to Website (or to Overview → Manage Instant Site).
  2. Scroll down to the “Advanced website settings” section and click Add Code under Custom JavaScript code:
    Adding_custom_code_to_Instant_Site__1_.png
  3. In the appeared field, enter your code (no longer than 4000 symbols).
  4. Save the changes.

Refresh the Instant Site page in your browser to see the changes.

Related articles

Instant Site Favicon
Verifying Instant Site ownership with Google Search Console
Pinterest Tag
Facebook Pixel

Was this article helpful?

Awesome! Thanks for your feedback!

Thanks for your feedback!

Sorry about that! What went wrong?
3 out of 8 found this helpful
10
We use cookies and similar technologies to remember your preferences, measure effectiveness of our campaigns, and analyze depersonalized data to improve performance of our site. By choosing «Accept», you consent to the use of cookies.
Accept cookies Decline