Can I Add Custom Code to Hubspot?

Can I Add Custom Code to Hubspot?

Yes. You can add custom code to a HubSpot landing page, but how depends on what kind of code and what access/plan you have.

Options (most common → most flexible)

1) Page-level code injection (good for tracking pixels like Visual Visitor)


  • In the landing page editor, go to Settings (or Advanced options) and add code to the Head HTML or Footer/Body HTML for that single page.
    HubSpot supports adding code snippets to the header/footer for individual pages (plan/permissions can affect what you see).



2) Domain-wide header/footer code (applies to all pages on that domain)


  • In HubSpot settings for the domain, you can add scripts into the Site header HTML / Site footer HTML areas (commonly used for global scripts).

    Info
    Best for tracking all pages vs specific landing pages.

3) Add custom HTML/JS via a module or template (best for “real” custom functionality)


  • If you’re using custom-coded templates/modules, you can add custom HTML/CSS/JS at the template/module level in Design Manager.



Quick rule of thumb

NotesTracking/analytics snippets → page-level Head/Footer code injection

  • Global scripts → domain header/footer

  • Custom layout/functionality → template/module (Design Manager)

    • Related Articles

    • How to Install a Tracking Script in Google Tag Manager to Fire on All Pages

      How to Install a Tracking Script in Google Tag Manager to Fire on All Pages If you need to install a tracking script (such as Google Ads, Meta Pixel, LinkedIn Insight Tag, or any custom code) on all pages of your website using Google Tag Manager ...
    • Where to Find Your Installation Script

      What is your tracking script? The installation script is a critical component for your website to enhance visitor identification and analytics capabilities. Embedded into the backend of your site, this code works silently yet efficiently, operating ...
    • Where to Add My Installation Code?

      Where Can I Put My Visual Visitor Code? When you sign up with Visual Visitor you receive a code to put on your website. This code can be placed within the body of a web page, the header, or the footer. Does It Matter Which Place I Choose to Put It? ...
    • Adding Visual Visitor to your Webflow Site

      To add custom scripts to your Webflow site, you have options depending on whether you want the script to apply site-wide, or to specific pages. Here's how you can do it: 1. Adding Site-Wide Scripts: If you want a Visual Visitor to run across your ...
    • Why Is My Tracking Script Blocked by a Cookie Consent Banner?

      Need Help Verifying Your Consent Setup? If you would like our team to review whether your cookie consent manager is configured correctly with Visual Visitor, please contact support@visualvisitor.com for assistance. The Visual Visitor cookie consent ...