Pulling cookie values into HubSpot forms on HubSpot landing pages
Hi all,
Looking for some advice/help on this issue as I've been unable to crack it and all the other posts in the forum are related to using the form embed code on outside pages. I'm looking to load cookie data into hidden form fields on an HS form on an HS landing page. The cookies are set and loaded correctly on the LP, as far as I can tell, but the form does not pick up on the matching cookie values.
Is it the case that using the form selector on the LP builder (which uses an iframe) is simply not a viable way to do this and would need to use the raw embed code? Is there something else I'm missing here?
Pulling cookie values into HubSpot forms on HubSpot landing pages
Thanks @tjoyce - Ultimate goal here is to be able to store UTMs (& other params) when someone lands on our site the first time but *doesn't* convert until later or on a separate page (the linked LP, for example). We want to have the UTMs still captured on that form completion as contact properties. If there's a better way to achieve this with what Hubspot already provides, I'd appreciate any direction you could give me there.
Pulling cookie values into HubSpot forms on HubSpot landing pages
@dennisedson - can you chime in here about the UTMs?
@SJD38 - You have tried to name the form fields exactly as the url parameters in the url? Say, for instance putting ?first_name=SJD38 would automatically populate the first_name field in a hubspot form.
Pulling cookie values into HubSpot forms on HubSpot landing pages
@tjoyce - My understanding is that that works if the visitor lands on a page with UTMs and the form is on said page, but doesn't work if their landing page doesn't have a form on it. The problem we're trying to solve here is how to preserve the UTMs when they first hit the site and then send to form when they finally convert later, on a different page. In looking for a solution, I saw suggestions that the hidden form fields (with matching names) would also be able to pull in cookie values but all of the solutions I can find speak to modifying the raw form embed code to make this work. I'm seeking a solution that would allow these values to be pulled into hidden fields in a form that is added to a HS landing page via the form selector, or confirm that the *only* way to do this is via raw embed code (in which case we'll look into a workaround on styling and layout).
Trying to capture utm_medium, utm_source, utm_campaign, utm_term as hidden fields via cookie. As mentioned, the script to set and call them is working fine but the form isn't picking them up and I'm at a loss for why.