Mautic Community Forums

Dynamic URL in Email button not working

Hello guys,

I’m trying to make a dynamic url into some buttons in my emails.

For example :
href=”{contactfield=firstname}” but it doesn’t work.

It works if I do it as a text, but it doesn’t work when I integrate this code in the button.

Any idea?

I tested it and the result is really strange. I built up a link exactly as you did ({contactfield=firstname}) and sent it to two contacts.

1st contact (called “Firstname (someText)”: The URL was shortened to
2nd contact (called “Firstname”): The URL was delivered with the name of the 1st contact

This is some bug I guess.

@bunce69 resolved?

Yeah mate :wink:

Thanks for your help

@Peter check with Bizcrony he has the solution

It would be great if the resolution was documented here in the thread. I guess I am not the only one interested in it.

Try changing {contactfield=…} to {leadfield=…}

For me it works ^^

Thanks to all


It does not work for me changing {contactfield = …} to {leadfield = …}
my version of mautic is v2.12.2
Could it be because of the coke that the ip does not detect and can not assign the field to it? ->