How to Detect Cookies Used By Hubspot Forms



We have a hubspot form on our site, when users fill out the form it sets a cookie on the domain then redirects users to another page with content. We want to make sure if someone has not filled out that form, and does not have this cookie they get redirected to the form if they try to visit the page. Since the cookie is set to instead of our staging or production link, we cannot read the cookies. Can you tell us how we can detect this cookie using PHP or some other means? Does the cookie need be setup differently?


HI @kkruslak,

Just to make sure that we're on the same page, you're looking to detect this cookie in order to make sure a contact has submitted the form in question? That's not really the intended use for the cookie, so I'm not entirely sure it's the best course of action. Is the goal to restrict certain content to visitors that have submitted a particular form?


I have the same question, or a similar one; leveraging the forms cookie to show/hide content.


Hi @allanwhite,

My last response still applies here; HubSpot forms don't use cookies (directly) to track submissions, so it's probably not a good idea. Depending on your use case, you might instead consider passing some query parameter to the form redirect URL or some other workaround.