We all started somewhere! Share your experience on the Get Advice: Let's Get Started Sweepstakes thread and be entered to win a $100 credit on your Constant Contact account.

Custom Field embedding into A Link.

lintun
Regular 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
David_J
Employee

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

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.

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

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. 

 

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

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

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

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

ErikS81
Regular Participant

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,

Hi Erik,

 

There has cerainly been enough interest in improving the process of putting custom fields into custom html emails to warrant a change.  I will continue tracking this, but the only thing stopping us is the resources to implement the change and current projects.  I believe the soonest a change will take place is in the fourth quarter of this year.  I will give our user experience team a firm nudge to see if they can help move this request forward.

 

Unfortunately we don't have any other methods or workarounds to pull in custom fields, but you could try using the notes field for [part of] your custom url, since it can accommodate up to 500 characters.

 

Best Regards,

Shannon W.

API Support Specialist

I just wanted to give this another "bump".

 

I went to have a graphic that says "click here", and the link contains a unique coupon code for every recipient so that I can track them in my point of sale (to prevent them from being passed around).  It seems so incredibly simple and the other tools I've used (MailChimp, Lyris, ...) have no problem doing it.

 

We have to use another tool for our campaign because of this limitation.  Otherwise, we'd love to be using Constant Contact.

Hello Mike,

 

Thank you for your feedback on this limitation! As Shannon mentioned, we have definitely identified this as an issue that is in need of work. However,  we do not have a specific time frame for when it will be available at this time. I have placed your name on the list of customers who would like to see this change so that the project managers can see that our customer are still asking for this feature.

 

 

Sincerely,

Elijah G.

Tier 2 Support

Elijah G.
API Support Engineer
KentW1
Regular Participant

Hi Elijah, just wanted to add us to the list. We've been needing this feature for years. :)

Hello Kent,
 
My apologies for not getting back to you sooner! Thank you so much for your feedback, and I have added your name to list! If there is any additional feedback that you would like me to include along with your name, please feel free to post it as a reply!
 
Sincerely,
Elijah G.
Tier 2 Support

Elijah G.
API Support Engineer
GaryA67
Occasional Participant

We need this too,  im starting to look at alternative platforms if it's not fixed shortly.

Hi

It is incredibly frustrating not to be able to track dynamic links.

For example. In the simplest situation, In order to give customers the convenience of a dynamic link direct to their subscriber settings on our website (by embedding their email address in a dynamic link) I have to lose the ability to see if anyone is actually using the link--because it's not possible to track dynamic links.

This is a particular problem in one of our accounts where we create dynamic links for each link in the email (so as to direct library patrons to the relevant version of the page for their library). In a typical email I probably have 10 links, and because not one of them is trackable, I have no insight whatsoever into whether the campaigns are working.

I see in the forums this has been under discussion for 10+ years but without a resolution! And worse, the last time I checked, it's not even possible to make a dynamic link in the new interface!

When will this get fixed so that dynamic links can be tracked?

 

Thank you,

Davina

 

RobinW93
Regular Participant

I'd like to see a better method for inserting dynamic links into email template.  I have offer codes and sometimes survey codes that are single use.  Seems like many folks could use a way to drop a unique code into an <a href'=>

Hello,

 

We have actually recently made an update to our contact data merging system that has changed how we handle this. We do still have the method for using <Property/> tags in XHTML, but we have also made the method of using $subscriber.propertyname valid in custom code emails as well as templated emails created in the UI. You can find a list of valid property names here: https://knowledgebase.constantcontact.com/articles/KnowledgeBase/13914-Personal-Contact-Details-for-...

 

Best Regards,

Elijah G.
API Support Engineer
DrewRoyals
Participant

I am in need of some help in terms of producing an XHTML File.  I work for a hockey team and we'd usually send most of our releases as jpg files.  I'm trying to find out how to allow people to just click on that image to go to another website.  I know there is an option to do the click here option, but the link is too long. 

 

If anyone could help me with that, it'd be great.  The link is below that I need to get figured out.

 

https://tickets.royalshockey.com/order/group/meetandgreet/

 

Hello,

 

If you are using a custom XHTML email to send your campaigns, you can find directions on creating a tracked and linked image here: https://knowledgebase.constantcontact.com/articles/KnowledgeBase/5699-guidelines-for-designing-custo...

 

If you run into issues with this, pelase let us know!

 

Best Regards,

Elijah G.
API Support Engineer
Developer Portal

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

Visit Page