Does anybody know how to personalize a landing page to display firstname and last name, by using query string info (?firstname=XXX&lastname=YYYY) rather than byusing existing contact properties (tokens).
Let's say I have a landing page at domain.com/123 that begins with
"Hello, "
What I want to achieve is for anyone that visits this landing page using the URL: domain.com/123?firstname=John&lastname=Smith the first line displays "Hello John Smith," rather than just "Hello"
I suppose it can be done using Java Script. Can anyone help with some ideas?
Thanks
If this is on a HubSpot page, you can use the default {{ request.query }} and/or {{ request.query_dict }} HubL variables. Some more info on these variables can be found in the designer docs:
Hey Derek - I was referred here by Hubspot chat support. I am trying to use a query string in the link of my Hubspot hosted landing page to populate the contact's first name into the landing page header. My example is very similar to what is listed above but I do not understand how to create the custom query string so that it pulls the appropriate name. Can you help?
If this is on a HubSpot page, you can use the default {{ request.query }} and/or {{ request.query_dict }} HubL variables. Some more info on these variables can be found in the designer docs:
Hi Derek, thank you for the tip! This seems to bring me a little bit closer, but when I use {{ request.query_dict }} variable it displays the whole query string including utms and so on, so the first line looks like