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=”https://domain.com/{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 (http://website.com/{contactfield=firstname}) and sent it to two contacts.

1st contact (called “Firstname (someText)”: The URL was shortened to http://website.com/
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

Hello

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? -> https://github.com/mautic/mautic/issues/5345