Mautic Community Forums

Using LeadList fields as parameters in link URLs

Hello - I was wondering if anyone else has struggled getting properly formatted trackable URLs using fields from the lead table.



Each time we try to insert a lead field into an email it encodes the short-code for the field and the field does not get inserted into the link.



Example of what we’d like:







And when we save it in either the builder (through a template) or the email editor it then saves the code like:







So that when it actually sends the email and attempts to insert field variables it fails.



I have looked at



https://github.com/mautic/mautic/pull/671

and

https://github.com/mautic/mautic/issues/643



which seems to suggest the method would work however no suck luck. Is there a way to not have the editors encode the link? Another method for getting lead fields into a URL?



Your help greatly appreciated.

Hello - I was wondering if anyone else has struggled getting properly formatted trackable URLs using fields from the lead table.

Each time we try to insert a lead field into an email it encodes the short-code for the field and the field does not get inserted into the link.

Example of what we’d like:

And when we save it in either the builder (through a template) or the email editor it then saves the code like:

So that when it actually sends the email and attempts to insert field variables it fails.

I have looked at

https://github.com/mautic/mautic/pull/671
and
https://github.com/mautic/mautic/issues/643

which seems to suggest the method would work however no suck luck. Is there a way to not have the editors encode the link? Another method for getting lead fields into a URL?

Your help greatly appreciated.

Hi, actually, I didn’t know Mautic has the short codes you’re using: {leadlist=id|true}, {leadlist=email}. If you want to use lead’s email in the URL, use {leadfield=email}.

Ah yes, thank you for the reply escopecz.

That was the issue. Not sure how we ever made the change from leadfield to leadlist but that seems to have solved it. Much appreciated.