Connect to HubSpot

IMPORTANT: As of November 30, 2022, HubSpot no longer allows API keys to be able to be used as an authentication method to access HubSpot APIs. Instead, you'll need to use a private app access token or OAuth to authenticate API calls. Make sure to upgrade to the latest patch for Sitefinity 13.3 or later to be able to integrate HubSpot with access tokens.  

You connect your Sitefinity CMS instance with a specific HubSpot Hub ID and Access token. When you integrate HubSpot with Sitefinity CMS, once a visitor lands on the page, HubSpot loads its script on your Sitefinity CMS landing page.

  • If the visitor is a known visitor, the pageview data is associated with the relevant contact in HubSpot.
  • If the visitor is not known, a new cookie is issued, which automatically creates a new customer GUID in HubSpot, so the pageview data is stored in HubSpot as an unknown visitor.

In both cases, if the same visitor logs from a different computer with their credentials, by logging in, for example, data is mapped and merged to their contact profile and you can access this data for analysis and reporting in HubSpot.

To connect, perform the following:

  1. In Sitefinity CMS, navigate to Administration » Connector for HubSpot.
  2. In the Hub ID field, paste the Hub ID from your HubSpot account.
    You can find the Hub ID in your HubSpot account.
  3. Enter your Access token.
    You can find the Access token in your HubSpot account. For more information, see HubSpot’s documentation on Private Apps
  4. Click Connect.

RESULT: Once you connect with HubSpot and map your forms, your landing page visits, completed forms, and contacts are tracked, and data is sent to HubSpot.

In case you want to change any of your connection setting, click the Change connection link.

Configure HubSpot scripts and domains 

If you have enabled the Sitefinity CMS Web security module, you must configure it to allow HubSpot sources for scripts and content, such as images. For more information, see Web security module.

To allow HubSpot related sources, perform the following: 

  1. In Sitefinity CMS backend, navigate to Administration » Settings » Web security
  2. Click the Edit link of Trusted sources
  3. In the Scripts text box, enter the following sources one per line:
    • https://js.hs-banner.com 
    • https://js.hsleadflows.net
    • https://forms.hubspot.com
    • https://js.hscollectedforms.net
  4. Expand Fonts, images, video and audio
  5. In the Images text box, enter the following sources one per line:
    • https://js.hsleadflows.net
    • https://forms.hsforms.com

    NOTE: HubSpot uses various domains for images. If an image does not load, you must add its domain to the trusted sources. 
    For more information, see HubSpot’s documentation » Manage the URL of files uploaded to the files tool.

  6. Expand Forms, frames, child sources, connect sources, plugins
  7. In the Frames text box, enter the following sources one per line:
    • 'self'
    • https://forms.hubspot.com
  8. In the Connect sources, enter the following sources one per line:
    • https://forms.hubspot.com
    • *.hsforms.com
  9. Click Done.

Integrate HubSpot popup form in Sitefinity CMS pages

To use HubSpot’s popup forms in Sitefinity CMS, perform the following:

  1. Connect to HubSpot. 
    For more information, see Connect to HubSpot.

  2. In the Web security module, configure HubSpot sources. 
    For more information, see Configure HubSpot scripts and domains.

  3. Create a popup form in HubSpot. 
    For more information, see HubSpot’s documentation » Create pop-up forms.

Increase your Sitefinity skills by signing up for our free trainings. Get Sitefinity-certified at Progress Education Community to boost your credentials.

Get started with Integration Hub | Sitefinity Cloud | Sitefinity SaaS

This free lesson teaches administrators, marketers, and other business professionals how to use the Integration hub service to create automated workflows between Sitefinity and other business systems.

Web Security for Sitefinity Administrators

This free lesson teaches administrators the basics about protecting yor Sitefinity instance and its sites from external threats. Configure HTTPS, SSL, allow lists for trusted sites, and cookie security, among others.

Foundations of Sitefinity ASP.NET Core Development

The free on-demand video course teaches developers how to use Sitefinity .NET Core and leverage its decoupled architecture and new way of coding against the platform.

Was this article helpful?