Auto-populate a contact property in landing page from url parameter



On a hubspot landing page, I'm displaying a company logo based on a contact property (using the clearbit logo api).

<img src="//{{contact.company_domain}}" width="128" height="128">

It works perfectly when the contact exists and has this property filled.

Problem: I want to be able to display any logo, even if the contact doesn't exist yet. I was thinking forcing it by adding url parameter into my landing page URL like below (just like we do when auto-populating forms):{{contact.company_domain}}

or maybe this?

but it doesn't work. Any advices or quick hacks to achieve this?


Form value auto populated via query string

Hi Jerome,

Since your problem is when a contact does not exist, why don't you try this?


We should to fetch values from the URL into our tracking codes.

If I've understood you well, this should do it.


Hey @Javier_Revilla,

Thanks for answering. I've tried this in my landing page url:

And I've tried each of these lines in my template, with no luck:

<img src="//{{request.query}}">
<img src="//{{request.query_dict}}">
<img src="//{{request.query_dict.company_domain}}">
<img src="//{{request.query_dict.get('company_domain')}}">

I've found some interesting info here, if you're interested. I'm stuck, any help appreciated!



I can't find why it isn't working for you. For example, we are just using this:


to fetch the paramter lead_id from the url and it works perfectly, it sends it into a rich text module.Sorry I can't be of more help:/


Hi @Jeromecollomb,

Can you send me a link to the page in question so I can take a closer look?


Sure, here is the link to the landing page

Thanks @Derek_Gervais


Hi @Jeromecollomb,

I jumped in and checked out that page, and it looks like it's still depending on a personalization token (i.e {{contact.company_domain}}) for the logo URL. I don't want to edit that page on your behalf; could you try replacing the personalization token with a HubL query selection (mentioned above)?

You can also try using a HubL if statement to default to the contact personalization token in the event that the contact already exists:

Form value auto populated via query string

Hi @Derek_Gervais thanks for taking the time to check the page.

I replaced the personalization token with the same query selection I placed a few days ago and it worked like a charm. I don't get it, I'm guessing it was a cache issue!

Thanks a bunch Derek, you made my day!

PS: For those who are interested, the code is the following:

<img src="//{{request.query_dict.company_domain}}">

Form value auto populated via query string