Same name for macro and variable in macro breaks custom objects/smart module

{% macro utm() %}
 {% set utm = '' %}
{% endmacro %}

We recently had a case where we saw the template code because we used a custom object personalization token in a field.

When the people at hubspot looked at the code, they told us using the same name for a variable in a macro with the same name will result in an error.

So for people that have the same issue, check your macro variables

Hey @dduymelinck, thank you for posting in our Community!

And sharing this solution! This will help other users searching for the same issue.

Kindly,

Pam