Adding Page Specific Script

If you are looking to add some custom Javascript to your front pages or Text/HTML modules, you can do using the Javascript integration, and then adding script to the pages in question. In this quick guide, we will go through the exact steps needs to do this!

Adding Page Specific Script

When creating or editing a front site page or a Text/HTML module, you will see the option to Add Script & Styles. This allows you to add page specific CSS (for styling) or page specific Javascript. When adding page-specific Javascript, the script tag will not be included on the front page or module settings--instead, you will add this to the Javascript integration area. Then you can add the specific code to the individual page or text module.

  1. First, add the script tag to the Javascript area. To do this, go to Integrations from the Admin Dashboard. Then click Manage under the Custom Javascript option
  2. Make sure that Enable Custom Javascript is toggled to on
  3. Add your script tag to the body tag section:
  4. Click Save Changes

Now, you can add the specific code to the page or text module.

  1. Go to the Text/HTML module, or the front site page you want to add the script to
    1. For Text/HTML module, click Courses>Text/HTML and then either select the one you want to edit, or click +Create Text/HTML Module
    2. For a site page, click Pages & Menus, then Pages. Select the page you want to edit, or click + Create Page
  2. Click Add Script & Styles
  3. Scroll to the Javascript area, and enter your code with no script tag, similar to this:
  4. Click Save Changes
  5. Preview your module or page, and if it looks good click to Save or Update Changes