Script Editor

Utilities > System settings >Script Editor

Add Java script to webpages.

Caution!

Partial, invalid or malicious scripts may create implications for your websites or pages. This feature should only be used by high level administrators.

Overview

The script editor allows Java script to be added to selected websites and webpages. Most common scripts associated with analytical tracking, online chat or similar, can be added and managed through the script editor.

Adding scripts

From the menu, select Utilities > System settings >Script Editor, then select create new script.

Add a name for the script in the name field, then paste the actual script into the script text area. Ensure that the script has the correct script opening and closing tags.

Correct example

<script>
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

  ga('create', 'UA-6242xxxx-1', 'auto');
  ga('send', 'pageview');

</script>

Select the position of the script. There are three options;

  1. Before head tag closed - this option will include the script in the head of the page, where scripts need to run on page load. Adding scripts to the head may affect page load speed.
  2. After body tag opened - this option will include the script at the top of the body content.
  3. Before body tag closed - this option will add the script at the end of the body content and is optimal for page load performance.

Select the website(s) that the code should be added to, from the drop down.

If the script is to be added to all pages (including pages that will be created in the future) of the selected website(s), check the 'Use for all pages in selected sites' check box.

Otherwise, select the language variants of the sites that the script is to be added to, then select individual webpages.

Note: Scripts will be automatically carried over to new versions of pages that scripts have been added to.

Managing scripts

The script table shows all of the scripts currently in use. Each row of the table displays the script name, the number of pages that it is in use on and controls to edit or delete the script.

 

 

Was this article helpful?