Code Snippets

Code Snippets:

Code snippet widget is for inserting third-party widgets and script into your website, for which default widgets are not available. These could be interactive widgets that you add to the body of your site, or tracking scripts that go into the header or footer. You cannot preview the widget because of security vulnerabilities. You'll have to publish your site to see how it appears.

There are two ways to add code snippets to your website, based on the purpose of the widget.

1. It could be a visible element on the content area of a page, on a sidebar or footer.2. It can be added to the header and footer of the site (not visible, but does something).

Visual Element:

1. Insert the Embed element to your site where you want to add the widget. 2. On the Embed widget, click on "Code Snippet" on the left.

3. Paste the script obtained from the widget's vendor in the box on the right. 4. Click on OK to save. Then publish your website for the widget to be updated.

Note: You cannot preview the widget because of security vulnerabilities. You'll have to publish your site to see how it appears. This is how the widget would appear on the builder.

Back-end scripts:

Scripts added to the website's header or footer that do not appear to visitors, can be added as explained below.

1. Access the website's setting page from the "Manage" options.

2. Select "Header and Footer Code" from the list of options on the left.

3. Toggle between the Header and Footer tabs on the right and paste the relevant codes. 4. Save the changes.5. Publish your website for the code to be updated.

Editing a widget:

1. Select the widget.2. Click on the "Edit" icon at the top left of the site editor.3. Make the desired changes to the code snippet.4. Click on OK when done.

Example - Integrate SalesIQ with Zoho Sites

SalesIQ is Zoho's Chat Support service. You can integrate it with your business website using the code snippet widget. Here is how;

1. Log into Zoho SalesIQ and click Copy this code .

2. Log into your Zoho Sites builder.3. Drag and drop the Embed widget from the Elements tab at the top of the screen, to the area where you would like the support service dialog to appear.4. Select Code Snippet from the menu on the left and paste the script from SalesIQ.