All Collections
Integrations
Content Management Systems (CMS)
Integrate Dotdigital with HubSpot CMS Hub
Integrate Dotdigital with HubSpot CMS Hub

Add scripts to your HubSpot site to power a range of Dotdigital features.

Laura Russell avatar
Written by Laura Russell
Updated over a week ago

There are a number of Dotdigital scripts you can add to your site through your Content Management System (CMS), which allow you to collect and transfer data, and trigger certain actions, across both systems.

Learn more about the available scripts in Integrate Dotdigital with your CMS.


Add scripts to your HubSpot site

With HubSpot, it’s possible to either add code snippets or scripts to a specific site page or post, or to add them to all content hosted on a specific domain.

The availability of these features can vary based on your HubSpot subscription.

Add code to the header or footer of a post or page

  1. In HubSpot, find the content that you want to add the script or code snippet to:

    • Website pages
      Go to Marketing > Website > Website Pages.

    • Landing pages
      Go to Marketing > Landing Pages.

    • Blog

      Go to Marketing > Website > Blog.
      Footer HTML isn’t available for blog posts.

  2. Hover over the piece of content you want, then select Edit.

  3. In the content editor view, select Settings then select Advanced.

  4. Under Additional code snippets, enter your code into the Head HTML or Footer HTML field.

  5. Select Publish or Update.

Add code to all content hosted on a domain

Scripts or code snippets added at a domain level aren’t applied to knowledge base articles.

  1. In HubSpot, select the settings icon in the main navigation menu.

  2. Go to Website > Pages.

  3. Expand the Choose a domain to edit its settings drop-down menu, and select the domain you want to edit.
    To apply the same code snippet or script to all HubSpot-hosted content, select Default settings for all domains.

  4. Select Override default settings under Site Header HTML or Site Footer HTML. Selecting this option means that code added to the default settings no longer applies to this domain’s content. To revert a specific domain's header or footer HTML to the Default settings for all domains, select Apply default settings.

  5. Enter your code snippet or script to the Site Header HTML or Site Footer HTML field.

  6. Select Save.

For further information or assistance on working with HubSpot, see the HubSpot support documentation or contact their Support team.

Did this answer your question?