How to create dynamic CTA?


#1

I want to make a call-to-action with dynamic link pointing to my website parametrized by contact id. I want to use it in emails and substitute contact id.
It should be an image button with image also parametrized by contact id.
So I need to substitute link and image URL into CTA code.
For that I first created a CTA my_cta with some default URL and button with a default image URL. I want to learn how to replace these URLs with different static URLs (before using any more complex stuff like contact id variable). So I wrote the following code in the email editor:

{% macro my_cta_html() %} 
<a href="http://media-www-asp.azureedge.net/media/38812/razor_programmingintro-5.jpg">
<img src="http://media-www-asp.azureedge.net/media/38812/razor_programmingintro-5.jpg" width="383" style="width: 383px; max-width: 383px;"></a>
{% endmacro %} 
{% cta "my_cta" label='Go', guid='f879491f-6b33-4ea7-85e3-045cca4b7844', full_html=my_cta_html() image_src='http://media-www-asp.azureedge.net/media/38812/razor_programmingintro-5.jpg' image_email='http://media-www-asp.azureedge.net/media/38812/razor_programmingintro-5.jpg' %}

But both on preview and during test sending in the email displayed CTA had default picture and link instead of substitutions. What I’m doing wrong and how can I achieve the goal?

What I also have tried is using instead of cta module embed code copied upon clicking “Embed” in context menu of CTA in CTAs list. I substituted URLs directly into that html, but effect was the same: display of default image and link.

Thanks,
Boris