HubSpot Ideas


Allow loading new CTAs (Beta) outside of iframe

The new CTA tool is amazing! Great work team! 


However, it looks like pop-ups load within iframes, which makes sense to ensure styling and scripts are isolated from the embedded website. 

However, at the moment this means those submissions and clicks can't be tracked from these on third party analytics services (such as google analytics). 


It would be great to be able to load these outside an iframe if required, or some way to embed custom tracking codes into the head HTML of the iframe. 

23 Replies
Participant | Platinum Partner

Yes, please!


+1 - the basic hubspot pop up forms are easily trackable. Please also make the CTA Beta Forms trackable.



I was very happy with the CTA Beta, but then found out it was loaded in an iFrame essentially not being able to track :'(


I have an additional use case for this, beyond scripts and trackers — I want to be able to use the pop up to generate a link, and include the original page as a parameter in the link.


For example, I want to be able to create a popup that prompts a user to login, and includes a parameter called "return" that includes the original page URL. So it'd work like this:

  1. CTA is configured to display on*
  2. The user visits and see the CTA
  3. The CTA includes a button that says "Login Now" with a link to


Because the CTA could render on an infinite number of pages that start with, it can't be hard-coded in—I need to pass a variable.


I've tried each of the below variables, but because it renders in an iframe, the always return values like or /hs-web-interactive-1231231-125123123510

  • {{ request.full_url }}
  • {{ request.path }}
  • {{ request.query }}
  • {{ request.referrer }}
  • {{ request.headers }}
  • {{ content.absolute_url }}
  • {{ page_meta.canonical_url }}



Related: Having access to useful information about the parent frame in the iframe's variables:


Hello, came from another thread that's been solved to avoid duplicates. On the other though, @BérangèreL invited subject matter experts into the conversation. Could you perhaps do it here as well? 🙂


Haven't been able to find a solution to track the form on CTA (Beta) that loads within the iframe either.




Being able to load the CTA's outside an iframe would be wonderful!  We currently give our (legacy) CTA's styling outside of the CTA tooling. When the CTA is displayed in a iframe, we lose that functionality which has a big impact on our website(s). 



Member | Platinum Partner

Yes please! We are unable to create custom styling for the CTA's.


Another vote for this. Wasted a lot of time today trying to get GA event tracking working for a form in a CTA. 


Yes, please! We need a solution for this


+1 to allow for GTM event tracking

Contributor | Elite Partner

+1 as well. Trying to do some basic things like gradient button background, custom fonts, etc. which would be easy if it wasn't locked inside an iframe. 


+1 Agree, we need to be able to track it with GTM


+1 Please find a soultion to this problem. Without this tracking, our Google campaigns are not accounting for the numerous conversions we are getting through them. 


I will deliver the good news because it seems that HubSpot themselves haven't found this thread yet!

HubSpot has recently released a new feature that allows you to create an HTML CTA which allows you to add your own custom CSS / HTML. This will solve the mentioned issue for a lot of people! You can find this setting when you create a new CTA. See the screenshot below:


HubSpot CTA.png


Participant | Partner

Man this seems such a step backwards putting it in an Iframe


+1, Please provide us with a way to configure the CTA form that needs to be loaded inside an iFrame or directly on the page's main document.


Yes please! It took us too long trying to get reporting setup for these new CTAs. 


+1 this has been extremely frustrating in our adoption of the new CTA popups. can't load custom fonts or site styles, and then found out you can't track which page a popup was viewed on or clicked-through from. i wanted to implement a GA tracking event for views and clicks, but the iframe prevents such a solution from being possible. please find a better solution for this that's more integrated with existing website features!


Yes to all the ideas above - I see the value in the new capabilities re: video etc but am confused by the forgotton and equally important - tracking and reporting - very limited dimensions and inability to work around with GTM + GA4 now....