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

**URL:** <https://community.hubspot.com/t/same-name-for-macro-and-variable-in-macro-breaks-custom-objects-smart-module/110136>\
**Category:** Sales Email\
**Tags:** templates, marketing-email\
**Created:** [June 26, 2024, 7:27am UTC](https://community.hubspot.com/t/same-name-for-macro-and-variable-in-macro-breaks-custom-objects-smart-module/110136 "2024-06-26T07:27:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dduymelinck](https://avatars.discourse-cdn.com/v4/letter/d/898d66/32.png) [@dduymelinck](https://community.hubspot.com/u/dduymelinck)\
**Post date:** [June 26, 2024, 7:27am UTC](https://community.hubspot.com/t/same-name-for-macro-and-variable-in-macro-breaks-custom-objects-smart-module/110136/1 "2024-06-26T07:27:53Z")

</div>

```lia-code-sample
{% 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

---

<div class="post-metadata">

**Author:** ![PamCotton](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/pamcotton/32/47916_2.png) [@PamCotton](https://community.hubspot.com/u/PamCotton)\
**Post date:** [June 26, 2024, 9:15pm UTC](https://community.hubspot.com/t/same-name-for-macro-and-variable-in-macro-breaks-custom-objects-smart-module/110136/2 "2024-06-26T21:15:47Z")

</div>

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
