Adding custom code to your site and page

You can add custom code snippets to your site using the code insertion fields in Website Settings.

Use Custom code to add HTML and scripts that enhance your site. Some of the code that can be added include:

  • Live chat services
  • Site analytics
  • Google Tag Manager

Note: Custom code functionality cannot be used for adding content or styles. To add content to your site, add a block. Visit this tutorial to learn more.

How to add site-wide custom code

  1. In the Website menu, click Settings…  

a1.png

 

2. Scroll down to the Custom code area.

 

a2.png

 

3. In the service from which you want to add code, copy the HTML code, and paste it in an appropriate field:

  • Inside <head> tag: Code added in this field is injected into the <head> tag on every page of your site. 
  • After <body> tag:  Code added in this field is injected after the opening <body> tag on every page of your site
  • Before </body> tag:  Code added in this field is injected before the closing </body> tag on every page of your site.

The results should look like this:

Screen_Shot_2020-05-21_at_18.30.57.png

4. Click Submit.

a3.png 

5. Click Publish. Your code will be injected.

a6.png

 

How to add per-page custom code

  1. Go to the Pages menu and click on the “cog” icon next to the page where you want to inject custom code.

a4.png

 

  1. Scroll down to the Custom code section.
  2. In the service from which you want to add code, copy the HTML code, and paste it in an appropriate field: 

 

A. Inside <head> tag: Code added in this field is injected into the <head> tag on this page only.

BAfter <body> tag:  Code added in this field is injected after the closing </body> tag on this page only.

CBefore </body> tag:  Code added in this field is injected before the closing </body> tag on this page only.

  1. Click Submit.
  2. Click Publish. Your custom code will be added to your page.

FAQ: How do I know in which area to add the code?

Some service providers give you instructions on which part of the HTML to add the code.

Screen_Shot_2020-05-21_at_18.28.44.png

Was this article helpful?
0 out of 0 found this helpful