APIs & Integrations

LWilton
Participant

HubSpot Pop Up Forms do not load until user refreshes browser

SOLVE

We've implemented hubspot's pop up forms on our web app and we're using segmented lists to segment the forms to specific users. We're using the Forms API to associate user's cookies to the correct profile in hubspot at the time the user logs in. In other words, whenever a user logs in, the corresponding contact  in hubspot is updated with the user's hutk cookie.  However, we are finding that our pop ups only appear after the user refreshes his/her browser. 

 

Is there a way around this? We want our pop ups to load after 7 seconds without the need to hit refresh.

0 Upvotes
1 Accepted solution
Teun
Solution
Recognized Expert | Diamond Partner
Recognized Expert | Diamond Partner

HubSpot Pop Up Forms do not load until user refreshes browser

SOLVE

@LWilton As I read your question more thoroughly, I think the fact that you update the contact might be the issue. If you load a specific form based on the content you update in your contact, you might need to manually trigger the form after the update has finished. You could try and look if manipulating the form embed code might work. You could even write some logic to update the Form ID based on the contact information.



Learn more about HubSpot by following me on LinkedIn or YouTube

Did my answer solve your issue? Help the community by marking it as the solution.


View solution in original post

3 Replies 3
LWilton
Participant

HubSpot Pop Up Forms do not load until user refreshes browser

SOLVE

Thank you for the suggestions. Our team will try implementing this in our next release cycle. In theory it seems like it will work. 

Teun
Solution
Recognized Expert | Diamond Partner
Recognized Expert | Diamond Partner

HubSpot Pop Up Forms do not load until user refreshes browser

SOLVE

@LWilton As I read your question more thoroughly, I think the fact that you update the contact might be the issue. If you load a specific form based on the content you update in your contact, you might need to manually trigger the form after the update has finished. You could try and look if manipulating the form embed code might work. You could even write some logic to update the Form ID based on the contact information.



Learn more about HubSpot by following me on LinkedIn or YouTube

Did my answer solve your issue? Help the community by marking it as the solution.


Teun
Recognized Expert | Diamond Partner
Recognized Expert | Diamond Partner

HubSpot Pop Up Forms do not load until user refreshes browser

SOLVE

@LWilton 

I do not exactly know how your code works, but maybe you need to wait for the form script to load. We use the following event listener to check if the form has loaded:

window.addEventListener('message', event => {
  if (event.data.type === 'hsFormCallback' && event.data.eventName === 'onFormReady') {
    // Do something here.
  }
});





Learn more about HubSpot by following me on LinkedIn or YouTube

Did my answer solve your issue? Help the community by marking it as the solution.


0 Upvotes