How to embed call-to-action buttons inside Custom HTML modules in HubSpot?

I’ve been trying to figure out how to add CTA buttons directly into Custom HTML modules in HubSpot. I found some documentation about adding CTAs to regular web pages, but nothing specific about integrating them within custom HTML code blocks.

I’m working on a landing page where I need more control over the layout and styling, so I’m using Custom HTML modules. However, I still want to track the performance of my call-to-action buttons through HubSpot’s analytics.

Has anyone successfully implemented CTA buttons inside Custom HTML modules? What’s the proper way to do this while maintaining the tracking capabilities? I’d really appreciate any guidance or code examples you might have.

Had the same issue! Don’t fight HubSpot’s system - just work with it. Create your CTA button normally first, then grab the iframe embed code from the CTA details page. Drop that iframe code straight into your custom HTML module. Tracking works perfectly and you can position it however you want. Just watch out that the iframe styling doesn’t break your layout.

Had this exact problem six months ago with a complex landing page. Skip the manual button creation - use HubSpot’s CTA embed code instead. Create your CTA in the CTA tool first, then grab the embed code. Drop that code into your Custom HTML module wherever you want the button. It’s just a script tag with the CTA ID. This keeps all the tracking working since HubSpot sees it as a real CTA. Way better than building custom buttons and crossing your fingers that analytics will catch them. Styling’s a bit annoying with HubSpot’s defaults, but you can override most of it with CSS.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.