Skip to main content
Skip table of contents

Adding a Code Snippet to Engaging Networks Pages

Some tools and services like cookie consent banners or analytics trackers require you to add a snippet of code to your Engaging Networks pages. This article walks you through the general steps for adding the code snippet.

Copy the Code Snippet

  • Log in to the service that provides the code snippet.

  • Locate the installation instructions. These usually include a small block of HTML or JavaScript code.

  • Copy the entire snippet.

Example:

CODE
<script src="https://example.com/widget.js"></script>

Adding the Code to Engaging Networks pages

Check the provider’s instructions for the recommended placement of the code. Most snippets need to be placed inside the HTML <head> section, but others might go in the <body>.

Snippets in the <head> section must be added to a page template. Snippets added to the <body> can be added to the template or can be added to a code block on individual pages.

Adding the snippet to a Template

  • Go to Pages > Components > Templates

  • Select image-20250820-164553.png to edit the template where you want to add the snippet

  • Edit the HTML of the template. Some templates will open by default to the HTML while blueprint templates will require you select the Edit HTML option on the bottom left

  • Locate either the <head> or <body> tags in the HTML

  • Paste the snippet in the correct location (between the opening and closing tags). Example:

HTML
<head>
  
<script src="https://example.com/widget.js"></script>
  
</head>
  • Save the template

The snippet will be added to all the pages that use that template.

Adding the snippet in a code block

  • Go to Pages > Manage Pages

  • Select image-20250820-164553.png to edit the page where you want to add the snippet

  • Select which page you want to add the snippet (for example, you may only want the snippet on the last /thank you page)

  • Hover to the right to expand the page builder toolbar

  • Select Components > Code Block and drag and drop a code block onto the page

  • Paste the snippet into the code block

  • Save the code block

After installing, test your pages to ensure they are working as expected and also that the snippet is working as expected (cookie banner displays, analytics are being tracked, etc).

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.