The Community is hosting an End of Summer sweepstakes! Participants must complete tasks to earn tickets that will enter them with a chance to win a free year of Constant Contact and other great prizes!*
*No Purchase Necessary. For Official Rules, visit here. Constant Contact’s End of Summer 2020 Sweepstakes ends on October, 20, 2020 at 11:50 PM EST.

How to customize HREF in an SimpleURLProperty link

Highlighted
New Member

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
Highlighted
Employee

dynamic links

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

Constant Contact 2020 End of Summer Community Sweepstakes!

The Constant Contact User Community is hosting a sweepstakes. The more you participate, the more chances you have to win! Read on to learn more...

Read More
Featured