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)


Info
Find your tracking script, here.