Embed Lead Flows onto site

forms
contacts

#1

Hello,
I have a part of the site where I can only embed Javascript onto the page. It would be ideal to embed the lead flow onto the site, or at least replicate the same logic.

Could I talk to any developer support regarding the topic and available options?


#2

Hi @Jost,

Lead flows are installed on your site using the HubSpot tracking code. Any page that has your HubSpot tracking code installed should be able to show your lead flows. The following Knowledge Base article has some more details on adding lead flows to your pages, and diagnosing them when they’re not appearing on certain pages:



#3

Thanks for your reply Derek,

Sadly I can only trigger the lead flow with a certain url parameter. However I would need to trigger the lead flow according to javascript objects or css selectors on the page. Is that possible?


#4

Hi @Jost,

I’m not sure what you mean. Lead flows are activated based on visitor scrolling, time spent on page, or exit intent. The lead flows are added to a page via the HubSpot tracking code, not a separate JavaScript embed. If you’re looking to implement a custom pop up similar to a lead flow, you could still track those submission by using the forms API:


#5

Hi @Derek_Gervais,

Thank you for the clarification. Browsing through the form API I haven’t found any way to recreate the lead flow fully.

The main painpoint here is that with leadflows you have the ability to show the form in steps. So when it does pop up it dosent take up most of the screen by default. Is there any way to recreate say this flow:

  1. form pops up with a subscription button
  2. form expands/renders the fields needed for the full form submission

#6

Hello again,

I have tried replicating the lead flow with JS and cannot add animations into the onFormReady attribute of the form API. On a test site i get no errors however when trying it out on the production server I get an “Animation to or from an underlying value is not yer supported.” error.

Is there a workaround for this?