cancel
Showing results for 
Search instead for 
Did you mean: 

Custom Field embedding into A Link.

Occasional Participant

Custom Field embedding into A Link.

Hi


I'm trying to add CustomText1 into A link. 


Below is the code I'm trying:


<a href='http://www.mydomain.com/confirmemail.php?code=<Property name="Subscriber.CustomText1"/>'>http://www.mydomain.com/confirmemail.php?code=<Property name="Subscriber.CustomText1"/></a>



<SimpleURLProperty name='http://www.mydomain.com/confirmemail.php?code=<Property name="Subscriber.CustomText1"/>' track="true" type="plain" label="Our Web Site" href= 'http://www.mydomain.com/confirmemail.php?code=<Property name="Subscriber.CustomText1"/>' />


 


Please kindly suggest how I can modify so that I can achieve the desired effect.


 


Best Regards,


 


Lin Tun

-Lin Tun

20 REPLIES 20
CTCT Employee

Dynamic Links

I think what you are looking to do is covered in this post. This goes over the use of dynamic links within an XHTML email. In essense, you need to place the entire HTML link tag within Custom Fields, and then place them on one line in your XHTML email like this:


 


<Property name="Subscriber.CustomText1"/><Property name="Subscriber.CustomText2"/><Property name="Subscriber.CustomText3"/>


 


Please note that each custom field can only hold a maximum of 50 characters. If this is not what you were looking for please let me know.

David J

Highlighted
Developer

Re: Dynamic Links

This is a terrible answer, and such a bad workaround for a common problem.  Either allow more than 50 characters so we don't consume multiple custom fields for a single tag or better yet, provide an alternate embed syntax for inside the html.

 

e.g.

 

<a href="http://www.google.com/?q=#{Subscriber.CustomText1}">Google Search</a>

 

Add a couple lines to your parser and you are done.  The above code will pass validations.

CTCT Employee

Re: Dynamic Links

Hi,

 

We agree that the current method to use subscriber data in custom code emails leaves something to be desired.  I have compiled a list of users requesting this process be streamlined, and I added you to it.  This request, in particular, will be brought up in a focus group here to see if this is something we can change sooner rather than later.  Thank you for the feedback.

 

Best Regards,

Shannon W.

API Support Specialist

Occasional Advisor

Re: Dynamic Links

Add me to the list also please. 
I'm trying to figure out houw to put two custom fields together (ie {$Subscriber.Customtext1}{$Subscriber.Customtext2}) as we've got some long URL's we'd like to track that are personal to each customer, it seems to work okay with one custom field but not when you put two together. 

 

CTCT Employee

Re: Dynamic Links

Hi,

 

I have added you to that list.  Are you trying Dave's method above?  The entire link code (starting with <a href and ending with </a>) should be contained by

 

<Property name="Subscriber.CustomText1"/><Property name="Subscriber.CustomText2"/><Property name="Subscriber.CustomText3"/>

 

Or perhaps this, if your url is longer than 50 characters.  

 

<Property name="Subscriber.CustomText1"/><Property name="Subscriber.CustomText2"/><Property name="Subscriber.CustomText3"/><Property name="Subscriber.CustomText4"/>

 

As mentioned before, each customer field can only contain 50 characters, so if you try to put something longer in, it will break the url.

 

Best Regards,

Shannon W.

API Support Specialist

Occasional Advisor

Re: Dynamic Links

Hi Shannon, 

Yes, we're currently using that method. But it's currently untrackable through Constant contact... Guess we're just going to have to do something different on our end =/...
It's a bummer because you can enter one custom field into the simple link property...

<SimpleURLProperty name="constantcontact.url"
track="true" type="plain"
label="$Subscriber.CustomText1"
href="$Subscriber.CustomText1"/>

And it seems to work okay but when you try to add 2 fields together...

<SimpleURLProperty name="constantcontact.url"
track="true" type="plain"
label="$Subscriber.CustomText1$Subscriber.CustomText2"
href="$Subscriber.CustomText1$Subscriber.CustomText2"/>

 This returns a big blank...
The programmers have got to have a current solution to this, I just don't know how their parser is set up to figure it out on my own...

 

Thanks,

 

Jamin

Honored Contributor

Re: Dynamic Links

Hi Jamin,

 

One more important thing to keep in mind is that Constant Contact's tracking system for links does not have any support for Dynamic links. This means that even in the case that you are able to merge all of the needed information into the XHTML it will still not be able to track the links that are created.

 

We do have a topic for tracking customer requests for this feature as well as the topic for more easily creating the dynamic links. I have added you to this list as well for being able to track dynamic links.

 

Sincerely,

Elijah G.

Tier 2 Support

Elijah G.
API Support Engineer
Occasional Advisor

Re: Dynamic Links

It's cool, we're making everything work on our end...

Occasional Participant

Re: Dynamic Links

Hi Shannon_W

 

Has there been enough people added to that list for this issue to be addressed? Do you know how long it might take? The alternative you mentioned does work, but we don't have enough custom fields left to do this. Do you have any other options in the meantime?

 

Thank you,