Using HubSpot Form/Landing Page as a Gate for Wordpress Site
SOLVE
I have a WordPress site that management now wants to put behind a gate so that we can collect user info.
My idea was to have all the pages on the site redirect to a HubSpot landing page with a form. The redirect would put the referring page into a field in the contact. The HubSpot page would reidrect to the referring page.
I can figure that all out but am having trouble figuring out how to let WordPress know they are now allowed.
1. Am I complicating the process? Is this doable?
2. Any Idea how I would get back into the referring page on WordPress without creating a redirect loop?
Using HubSpot Form/Landing Page as a Gate for Wordpress Site
SOLVE
If you're on a HubSpot page then yes you can use a query string with presonalization tokens to populate specific fields.
However, if you're using personalization tokens, the cookie needs to already be known. So they will need to have submit a form before in order for HubSpot to recognise who the visitor is to populate the personalization tokens.
Personalization tokens also won't work on external sites, HubSpot generates them on page load. So for example if you had a form that had:
First name & last name.
Then you set your redirect to your wordpress page to "mywebsite.com?firstname={{first.name}}&lastname={{last.name}}
Both the HubSpot form wouldn't process the data quick enough to pass the data to the redirect page even if was a HubSpot page, and since it is a wordpress page, the wordpress page doesn't have any system to process the personalization tokens from HubSpot to populate them with data.
Tom Mahon Technical Consultant | Solutions Engineer | Community Champion Baskey Digitial
Using HubSpot Form/Landing Page as a Gate for Wordpress Site
SOLVE
Hey @JCrowNM the only way to achieve this would be through custom javascript. You would need to customise the form embed code. Then you could use a code like this one to set the specific redirect of the forms based on a specific criteria.
Additionally then you would need some custom script to grab the referring page and spit it into the custom script but I don't have a guide on that one unfortunately.
Tom Mahon Technical Consultant | Solutions Engineer | Community Champion Baskey Digitial
Using HubSpot Form/Landing Page as a Gate for Wordpress Site
SOLVE
I was thinking of not using the embed code - just using a HubSpot landing page. So, on the HubSpot side couldn't I use a query string in the link to the landing page. Have the query string populate hidden fields in the form on that page. Then use personalization tokens within the external link as the redirect?
From the WordPress side I would need to build some code to redirect the page but only if they haven't been redirected from HubSpot. Still looking for answers on that one.
Using HubSpot Form/Landing Page as a Gate for Wordpress Site
SOLVE
If you're on a HubSpot page then yes you can use a query string with presonalization tokens to populate specific fields.
However, if you're using personalization tokens, the cookie needs to already be known. So they will need to have submit a form before in order for HubSpot to recognise who the visitor is to populate the personalization tokens.
Personalization tokens also won't work on external sites, HubSpot generates them on page load. So for example if you had a form that had:
First name & last name.
Then you set your redirect to your wordpress page to "mywebsite.com?firstname={{first.name}}&lastname={{last.name}}
Both the HubSpot form wouldn't process the data quick enough to pass the data to the redirect page even if was a HubSpot page, and since it is a wordpress page, the wordpress page doesn't have any system to process the personalization tokens from HubSpot to populate them with data.
Tom Mahon Technical Consultant | Solutions Engineer | Community Champion Baskey Digitial