Skip to main content

Adding Page Specific JavaScript

If you are looking to add some custom JavaScript to your front pages or Text/HTML modules, you can do this using the JavaScript integration, and then adding the script to the pages in question.

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 JavaScript, the script tag will not be included on the front page or module settings--instead, you will add this in the JavaScript Integration settings. 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 turned on.
  3. Add your script tag to the body tag section:

  1. 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

  1. Scroll to the JavaScript section, and enter your code with no script tag, similar to this:

  1. Click Save Changes
  2. Preview your module or page, and click Save or Update Changes to confirm.