How to customize HREF in an SimpleURLProperty link

Occasional Participant

How to customize HREF in an SimpleURLProperty link

Hi!


I'm trying to create this link in a XHTML email:


<a href="http://www.domain.com/username">My Profile</a>


The username is store in the CustomText1 property;


I've tried:


<IfPropertyExists name="Subscriber.CustomText1"><a href="http://www.domain.com/<Property name="Subscriber.CustomText1"/>">My Profile</a></IfPropertyExists>


but it failed and I wouldn't be tracking the link.


something like this probably wouldn t work: <SimpleURLProperty name="username.url" track="true" type="plain" label="My Profile" href="http://www.domain.com/<Property name="Subscriber.CustomText1"/>"/>


Thanks for your help,


Laurent

1 REPLY 1
Employee

Hello Laurent,



Our system does not allow for tracking dynamic links. The way to create a dynamic link in XHTML would be this way: It would need to be split between 3 custom fields. Custom field one would be: <a href="http://www.domain.com/ Custom field two would be: My Profile and custom field three would be: </a>



Then in your code you would put: <Property name="Subscriber.CustomText1"/><Property name="Subscriber.CustomText2"/><Property name="Subscriber.CustomText3"/>



This should properly create the dynamic link, although note that there is no way to track it.



If you have any questions please let me know.



Regards,

Benjamin Soder
NOC Analyst
Constant Contact
Developer Portal

View API documentation, code samples, get your API key.

Visit Page