Zoomforth's Site Scripts feature allows you to add custom JavaScript, primarily for analytics and tracking purposes, to your site.
This is an advanced feature intended for users who are comfortable working with JavaScript. Before using Site Scripts, make sure you understand the script you are adding and how it may affect your site.
For an overview of supported analytics and tracking integrations, see Zoomforth's Analytics and Tracking Integrations.
Before You Begin
Make Sure Site Scripts Is Enabled
The Site Scripts feature must be enabled for your Zoomforth account before you can use it.
To check whether the feature is available:
Open the Site Details page for the site.
Select the More tab.
Look for the Site Scripts option.
If Site Scripts is visible, the feature is enabled for your account.
If you do not see the option, contact Zoomforth Support to request access.
Adding or Updating a Site Script
When adding a script, follow these guidelines:
Enclose each JavaScript code snippet in a
<script>tag.Only the
<script>HTML tag is supported.Each script should preferably be placed in its own
<script>tag when adding multiple scripts.Scripts are inserted at the end of the site's
<head>tag.Scripts run each time a visitor loads the site.
For example:
<script> // Your JavaScript code goes here </script>
Important: Do not add unsupported HTML tags. Unsupported tags may appear as visible text on your site after the script is saved. Always check the published site after making changes.
Save Changes Carefully
Site Scripts take effect immediately when you click Save.
Unlike other site or theme changes, you do not need to publish the site after saving a Site Script. The updated script is applied immediately to the site.
Because of this, always review your code carefully before clicking Save.
Site Scripts Only Run on Published Sites
Site Scripts run only on published sites.
They do not run in:
Site Preview
Site Editor
This behaviour is intentional because Site Scripts are primarily designed for analytics and tracking purposes.
Recommendation: Do not use Site Scripts to modify site content, layout, or styling. Use the appropriate Zoomforth editing and styling features instead.
Important: Test Your Script Before Saving
A faulty or incompatible script can affect how your site behaves for visitors. In some cases, a script may prevent parts of the site from working correctly.
Before adding or updating a script:
Review the JavaScript carefully.
If possible, create a duplicate of your site as a backup.
Add the script to the appropriate site.
Click Save.
Open the published site and verify that it is working as expected.
Check that the analytics or tracking functionality is working correctly.
For instructions on duplicating a site, see How to Duplicate a Site.
Support Scope
Site Scripts require a working knowledge of JavaScript and scripting techniques.
Zoomforth Support can assist with the availability and general use of the Site Scripts feature, but script development, debugging, and troubleshooting custom JavaScript are outside the standard support scope.
Use Site Scripts with caution and make sure you understand the code before applying it to a live site.
Best Practice: Use Site Scripts primarily for analytics and tracking. For changes to site content, appearance, or functionality, use Zoomforth's built-in site editing and styling features whenever possible.
Need Help?
Contact Zoomforth Customer Support through the in-app chat or email support@zoomforth.com.
