Email to Landing Page: Pass UTM Parameter and Display Block


I would like one landing page, with content that is shown/hidden based on a parameter from the UTM in the URL. After reading into it, it seems doable, but I cannot find reference as to "how" to make the landing page behave based on the UTM.





Screen Shot 2021-09-27 at 1.01.26 PM.png

3 Replies 3
Community Manager

Hello @darley , thank you for providing details of your goal, I will add some top experts to share their ideas @DanielSanchez @Gonzalo any recommendations to @darley?


Thank you,


Você sabia que a Comunidade está disponível em outros idiomas?
Participe de conversas regionais, alterando suas configurações de idioma !

Did you know that the Community is available in other languages?
Join regional conversations by changing your language settings !

Top Contributor

Hi @darley ,


You can easily achieve this by using HubL.

This is one way of doing it:

{% if Query.utm_term|lowercase == "yes" %}
[...] you content here [...]
{% elif Query.utm_term|lowercase == "no" %}
[...] you content here [...]
{% endif %}

Keep in mind a few things:

- Using the Query variable or request variable will make your page uncacheable for the Hubspot CDNs, so use it with caution. For example, don't use this in a generally shared template across your website, use it only within that page.

- If your content is somewhat complex, you may want to use the drag and drop area for the content editor, I would create a couple of dnd_areas, and having those separated will help you to process them independently. But if those are some paragraph or something that can be self-contained within a rich text module, go that route as will be much more easier to just handle everything under the rich text module.

Thanks for tagging @PamCotton 




Key Advisor

Hello @darley ,


You can use Smart Contents to display different content to whoever clicked each button.


Whoever clicks "Yes" goes to one list and whoever clicks "No" goes to another list. Based on the lists, you can display different content using Smart Rules.


Smart Rules are at the module level. Click to edit a module and the option will appear.




Did this post help solve your problem? If so, please mark it as a solution.


Best! 🙂