{"article":{"id":8359349900828,"url":"https://ecwidhelp.zendesk.com/api/v2/help_center/en-us/articles/8359349900828.json","html_url":"https://support.ecwid.com/hc/en-us/articles/8359349900828-Adding-custom-code-to-Instant-Site","author_id":389192317019,"comments_disabled":true,"draft":false,"promoted":false,"position":1,"vote_sum":-3,"vote_count":13,"section_id":12345592066588,"created_at":"2023-04-06T18:06:34Z","updated_at":"2025-10-04T11:31:14Z","name":"Adding custom code to Instant Site","title":"Adding custom code to Instant Site","source_locale":"en-us","locale":"en-us","outdated":false,"outdated_locales":[],"edited_at":"2025-09-15T09:55:08Z","user_segment_id":null,"permission_group_id":289649,"content_tag_ids":[],"label_names":["use_for_answer_bot"],"body":"<p>Custom code allows you to verify <a href=\"https://support.ecwid.com/hc/en-us/articles/207100069-Guide-to-Ecwid-Instant-Site\" target=\"_self\">Instant Site</a> 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.</p>\n<p>There are two places on Instant Site where you can add code: the header section and the body section. Also, you can add dedicated <a href=\"https://support.ecwid.com/hc/en-us/articles/11721659199388\">sections</a> with custom code to individual Instant Site <a href=\"https://support.ecwid.com/hc/en-us/articles/11722363160988\">pages</a>.</p>\n<div class=\"promote\">\n<div>Plan availability: <a href=\"https://support.ecwid.com/hc/en-us/articles/207100729#compare\">Venture, Business, Unlimited.</a>\n</div>\n<div><a class=\"btn btn--small btn-upgrade\" href=\"https://my.ecwid.com/cp/?place=billing\" target=\"_blank\" rel=\"noopener noreferrer\">Upgrade</a></div>\n</div>\n<h2 id=\"h_01HBDHPVHW5VCHBB1R30MEDR5Z\">\n<a id=\"Choosing_where_to_add_code\" name=\"Choosing_where_to_add_code\"></a>Choosing where to add code</h2>\n<p>Adding code to the Instant Site header or body allows you to apply code to all the site pages. Pasting code into an Instant Site <a href=\"https://support.ecwid.com/hc/en-us/articles/11721659199388\">section</a> enables you to add custom code to a particular site <a href=\"https://support.ecwid.com/hc/en-us/articles/11722363160988\">page</a> where this section belongs.</p>\n<p>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.</p>\n<p>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.</p>\n<p>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.</p>\n<h2 id=\"h_01HBDHPVHX4GPJ7TJ99C8JSPPE\">\n<a id=\"Adding_code_to_head_section_of_Instant_Site\" name=\"Adding_code_to_head_section_of_Instant_Site\"></a>Adding code to the head section of your Instant Site</h2>\n<p>Inserting code into Instant Site header is your option if you need to verify site or domain ownership (e.g., when <a href=\"https://support.ecwid.com/hc/en-us/articles/115005892705-Selling-on-Facebook\" target=\"_self\">selling</a> or <a href=\"https://support.ecwid.com/hc/en-us/articles/115004581349-Ads-campaign-on-Facebook\" target=\"_self\">advertising</a> on Facebook). You can add multiple codes to the header section.</p>\n<p>To add a custom code to the Instant Site head section:</p>\n<ol>\n<li>From your Ecwid admin, go to <a href=\"https://my.ecwid.com/#website-overview\" target=\"_blank\" rel=\"noopener\">Website</a> (or to <a href=\"https://my.ecwid.com/#starter-site\" target=\"_blank\" rel=\"noopener\">Overview → Manage Instant Site</a>).</li>\n<li>Scroll down to the “SEO settings” section and click <strong>Add Code</strong> under <strong>Header meta tags and site verification</strong>:<br><img src=\"https://support.ecwid.com/hc/article_attachments/8360474849820\" alt=\"Adding_custom_code_to_Instant_Site__2_.png\">\n</li>\n<li>In the appeared field, enter your code.</li>\n<li>Save the changes.</li>\n</ol>\n<p>Refresh the Instant Site page in your browser to see the changes.</p>\n<h2 id=\"h_01HBDHPVHXCS7NP6RQ7TBZYT53\">\n<a id=\"Adding_code_to_body_section_of_Instant_Site\" name=\"Adding_code_to_body_section_of_Instant_Site\"></a>Adding code to the body section of your Instant Site</h2>\n<p>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 <strong>&lt;body&gt;</strong> section of the site, so most likely at the very end of your site.</p>\n<p>To add a custom code to the Instant Site body section:</p>\n<ol>\n<li>From your Ecwid admin, go to <a href=\"https://my.ecwid.com/#website-overview\" target=\"_blank\" rel=\"noopener\">Website</a> (or to <a href=\"https://my.ecwid.com/#starter-site\" target=\"_blank\" rel=\"noopener\">Overview → Manage Instant Site</a>).</li>\n<li>Scroll down to the “Advanced website settings” section and click <strong>Add Code</strong> under <strong>Custom JavaScript code</strong>:<strong><br><img src=\"https://support.ecwid.com/hc/article_attachments/8360486551964\" alt=\"Adding_custom_code_to_Instant_Site__1_.png\"><br></strong>\n</li>\n<li>In the appeared field, enter your code (no longer than 4000 symbols).</li>\n<li>Save the changes.</li>\n</ol>\n<p>Refresh the Instant Site page in your browser to see the changes.</p>\n<h2 id=\"h_01HBDHPVHXVZTWQBZ3TQAW95RF\">\n<a id=\"Adding_custom_code_section_to_Instant_Site\" name=\"name\"></a>Adding custom code sections to individual site pages</h2>\n<p>You can add a dedicated <a href=\"https://support.ecwid.com/hc/en-us/articles/11721659199388\">site section</a> with custom code (HTML, CSS, or JavaScript) to any Instant Site <a href=\"https://support.ecwid.com/hc/en-us/articles/11722363160988\">page</a> you want. For example, if you need a Google Calendar widget on your homepage so that customers can book your music lessons, or you want to show a 3D view of your brick-and-mortar store to shoppers on the Contacts page.</p>\n<div class=\"note\">Adding sections with custom code is not supported on the <a href=\"https://support.ecwid.com/hc/en-us/articles/11699104532124\">legacy version of Instant Site</a>.</div>\n<p>To add a site section with custom code:</p>\n<ol>\n<li>From your Ecwid admin, go to <a href=\"https://my.ecwid.com/#website-overview\" target=\"_blank\" rel=\"noopener\">Website</a><strong> → Edit Site</strong>.</li>\n<li>(if you've added multiple pages to your site) From the <strong>Page: Homepage</strong> dropdown in the left upper corner, choose the page where you want to add your code.</li>\n<li>Click <strong>Add Section</strong>, then scroll down to <strong>Advanced Solutions</strong>.</li>\n<li>In the <strong>Embed &amp; Custom Code</strong> block, click <strong>Add Custom Code Section</strong>:<br><img src=\"https://support.ecwid.com/hc/article_attachments/22343207660572\" alt=\"Embedding custom code.png\">\n</li>\n<li>Paste your code into the field.</li>\n<li>Click <strong>Back</strong> and drag and drop the section in the sections list to change its positioning on the site page.</li>\n<li>Once you are done editing your website, click the <strong>Publish</strong> button in the top right corner of the editor.</li>\n</ol>\n<p>That's it! You've added your custom code to an Instant Site section on a page. Refresh the page in your browser to see the changes.</p>\n<p class=\"h2\">Related articles</p>\n<p><a href=\"https://support.ecwid.com/hc/en-us/articles/360003068399-Instant-Site-Favicon\" target=\"_self\">Instant Site Favicon</a><br><a href=\"https://support.ecwid.com/hc/en-us/articles/360001347040-Verifying-your-site-with-Google-Search-Console#verifying-instant-site-ownership-with-google-search-console\" target=\"_self\">Verifying Instant Site ownership with Google Search Console</a><br><a href=\"https://support.ecwid.com/hc/en-us/articles/360000583185-Pinterest-Tag\" target=\"_self\">Pinterest Tag</a><br><a href=\"https://support.ecwid.com/hc/en-us/articles/115004303345-Facebook-Pixel\" target=\"_self\">Facebook Pixel</a></p>","user_segment_ids":[]}}