Add HubSpot form data as parameters on the redirect URL

    Difficulty Level: Easy. This post assumes a basic understanding of HubSpot tools and little to no technical knowledge.

    You can add parameters directly to the redirect URL by using personalisation tokens in the URL, like the email address in the example below: 

    https://domain.com/thank-you?email={{contact.email}}

    It appears that you can only do this when setting the redirect URL at the page/template level and not when setting it directly in the Forms tool.

    How do I populate a form on the next page?

    Provided that the field name you add in in your redirect URL matches the property's internal name, it should populate that form field. 

    So, for example, if you go to the URL http://stephanieogaygarcia.com/contact?firstname=Harry&lastname=Potter - it should populate the first and last name fields with Harry and Potter respectively.

    You can go to Settings > Properties and open any property to find it's internal name: 

    Shows the first name contact property with an arrow pointing at the internal name field

    Where do I find the personalisation tokens?

    Your personalisation token will always be surrounded by curly brackets ({{ and }}) to mark it as a HubL expression.

    Inside the curly brackets you will set the object type (contact, company, deal...) followed by a dot (.) and the property's internal name. The property's internal name can be found under Settings > Properties by clicking into the property. 

    So, for example, the contact's first name property has the internal name "firstname": 

    HubSpot Contact Properties - First Name Internal Value

    So the personalisation token for it would be: 

    {{contact.firstname}}

    Finding a personalisation token in your content

    Another trick you can use is to add a personalisation token to your content, then click into Advanced > View Source Code where you should be able to find it within the code. Copy and paste the curly brackets and everything in between and add it to your redirect URL above.

    Last Updated: October 4, 2019

    Thank you! I appreciate the feedback 😊

    Sorry to hear that! 🙁

    I'd appreciate if you could take a moment to let me know how I can improve this article.

    💻

    Looking for a HubSpot website developer?

    I can help you with website themes, templates, page setup and custom modules. 

    Get in touch

    Stephanie O'Gay Garcia

    Hi! 👋 I'm a freelance HubSpot Website Designer & Developer based in Toronto (Canada). Give me a shout if you have questions about this post or there's anything I can help you with.