APIs & Integrations

Bri822
Member

Prepopulating Form Across Browser Pages

SOLVE

I am getting started with Hubspot and was trying to send a link to customers that would prepopulate their information in a form. I was able to get this to work using query parameters. Unfortunately, if a customers click a link to visit a different part of our website, the query parameters are dropped. When the user opens the form on the new page it is not prepopulated since the query parameters are no longer present..

I tried to use the identify API from Hubspot, setting values found in the query parameters but the value did not appear to be set in the form when I navigated to a new page.

I was hoping there would be some cookie I can set/interact with to store this information so it can easily be retrieved on subsequent pages. It would be great if I could store a cookie so if the user revisits at a later time, they would not need to fill in the form manually. Any guidance would be greatly appreciated.

0 Upvotes
1 Accepted solution
Bri822
Solution
Member

Prepopulating Form Across Browser Pages

SOLVE

Hey Leif,

I was playing around with more things and believe I solved the problem. I was testing on a new beta version of our site on a different url. This site was not added to the HubSpot tracking domains, (Reports > Tracking Code > Advanced Tracking). You likely know more, but since this was missing I believe when I added the tracking information HubSpot didn't know it should do anything and hence, didn't capture the information I set.

Now that I added the beta site domain to the tracking domains, it appears to be working perfectly. Thank you very much for your time and offer to take a look at the site!

View solution in original post

0 Upvotes
4 Replies 4
Bri822
Solution
Member

Prepopulating Form Across Browser Pages

SOLVE

Hey Leif,

I was playing around with more things and believe I solved the problem. I was testing on a new beta version of our site on a different url. This site was not added to the HubSpot tracking domains, (Reports > Tracking Code > Advanced Tracking). You likely know more, but since this was missing I believe when I added the tracking information HubSpot didn't know it should do anything and hence, didn't capture the information I set.

Now that I added the beta site domain to the tracking domains, it appears to be working perfectly. Thank you very much for your time and offer to take a look at the site!

0 Upvotes
LeifInouye
HubSpot Alumni
HubSpot Alumni

Prepopulating Form Across Browser Pages

SOLVE

Hey Brian,

Interesting, would you mind linking me to one of those pages? If you have a HubSpot embedded form on a page with the tracking code installed on it, then you should see cookie tracking occurring.

The alternative way to do this would be using our forms API but per what you said, I think what you are doing is the path of least resistance.

Do you have the tracking code behind the page in question?

0 Upvotes
LeifInouye
HubSpot Alumni
HubSpot Alumni

Prepopulating Form Across Browser Pages

SOLVE

Hey Bri,

Are your users submitting external forms? How are you currently passing the data they are submitting into HubSpot? Or are these form embeds from HubSpot on external pages.

0 Upvotes
Bri822
Member

Prepopulating Form Across Browser Pages

SOLVE

Hi Leif,

The forms are Hubspot forms that are embedded on our site. If there is a solution that works via external forms and not embedded forms, please let me know as I can do either but was just using the path or least resistance.

0 Upvotes