Using coded-in modules to attach UTMs to smart links
I'm experimenting more with template opportunities, specifically using smart modules in the templates themselves as opposed to within the email editor. I'm not sure if this is the best way to go about the situation, but it's something.
We often send the same email, to customers as well as leads, with slight copy changes between the two groups. One of those changes is our email footer. I'm wondering if I could make a template that uses a smart module as the footer to display either the lead footer or customer footer.
I've tested that part and it works, however, I also need to be able to add the correct UTM parameters to the respective footer links.
I'm still new to this, but I tried adding in a bit of code to the header to create a sidebar module for inputting the link, however it doesn't seem to be carrying over correctly.
This is what I've added to the header:
{% text "leads_blog_utm" label="Leads Blog UTM", value="#", export_to_template_context=True %}
{# Makes the parameters available to be stored and used in template logic #}
And I was trying to attach that to the link like this:
Using coded-in modules to attach UTMs to smart links
When I put the UTM parameter into the section in the left red box, to be appended to the links in the right red box, I had two different results for the homepage link.
When previewing it as a lead contact in the editor, I grabbed this link:
Using coded-in modules to attach UTMs to smart links
Well, I think I figured it out now that you say that. There was a syntax error in the way I coded it and now it's carrying over. So, it looks like this is solved and working. Thanks for the help!