Dynamic links in custom xhtml email campaign

SOLVED
Highlighted
Member

Dynamic links in custom xhtml email campaign

Hi,

 

I need a dynamic link in the custom xhtml email campaign that is scheduled through the API.

 

http://www.test.com/test.php?e=example@test.com

 

In the above link i need contacts email id to replace' example@test.com' dynamically.

 

I have tried using custom fields for links

 

Custom Field 1: <a href="www.test.com/test.php?e=

Custom Field 2: ">test link</a>

Then using property tags to link in the contacts information: <Property name="Subscriber.CustomText1"/><Property name="Subscriber.Email"/><Property name="Subscriber.CustomText2"/>

 

But didnt work for me.

 

Please help and let me know where am i going wrong.

 

Thanks,

Harika

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Moderator

Re: Dynamic links in custom xhtml email campaign

Hi Harika,

 

Your format looks correct to me. I've tested the same code using my account, just to be sure, but it's working on my end. I will note that the dynamic links will not work in preview or test emails, and the email has to be defined as XHTML (not just simple HTML).

 

If you're still having problems with the dynamic links, I would suggest you email support directly at support@constantcontact.com.

Nick Galbraith
Support Engineer

View solution in original post

12 REPLIES 12
Highlighted
Moderator

Re: Dynamic links in custom xhtml email campaign

Hi Harika,

 

Your format looks correct to me. I've tested the same code using my account, just to be sure, but it's working on my end. I will note that the dynamic links will not work in preview or test emails, and the email has to be defined as XHTML (not just simple HTML).

 

If you're still having problems with the dynamic links, I would suggest you email support directly at support@constantcontact.com.

Nick Galbraith
Support Engineer

View solution in original post

Highlighted
Member

Re: Dynamic links in custom xhtml email campaign

Hi Nick,

 

Thanks for your reply. I am able to include the hyperlink using custom fields as you mentioned. 

 

But is  there any way of just including the contact's email in the href link without using custom fields as shown below

 

<a href="www.test.com/test.php?e=<Property name="Subscriber.Email"/>"></a>

 

Please let me know the correct syntax or usage if this is possible.

 

Thanks,

Harika

Highlighted
Member

Re: Dynamic links in custom xhtml email campaign

Have you found a solution to your problem?

This is exactly what I am trying to do.

 

-nn

Highlighted
Moderator

Re: Dynamic links in custom xhtml email campaign

Hey Shawna & Harika,

 

I'm sorry I didn't touch on this earlier. We process the XHTML validator before we switch out the dynamic content. This means that the following code would result in an error:

<a href="http://www.site.com/<Property name="Subscriber.Email" />">link text</a>

 The validator will search through this string and see that a new tag is being opened (<Property) before the original anchor tag was closed. This error will stop the email from being sent, which will stop the content from being filled dynamically.

 

This means the only way to set up dynamic links, even if the dynamic content is already an existing field, is the way it was laid out originally in your post. Example would be:

 

Custom field 1 = <a href="http://www.site.com/page.php?p=
Custom field 2 = 123456
Custom field 3 = ">link text</a>

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

 

Nick Galbraith
Support Engineer
Highlighted
Member

Re: Dynamic links in custom xhtml email campaign

I want to send an email that delivers the customer's monthly invoice (via a link to the libary PDFs).  How do I dynamically link each customer's email to their invoice?...ie...there is not 1 invoice for all customers.  Thank you.

Highlighted
Moderator

Re: Dynamic links in custom xhtml email campaign

Hi Scott,

 

Are you asking to create dynamic links inside the body of an email to separate PDF files, or are you looking to make the PDFs themselves dynamic?

Nick Galbraith
Support Engineer
Highlighted
Member

Re: Dynamic links in custom xhtml email campaign

Hi Nick,

 

The former: dynamic links inside the body of an email to separate PDF files.

 

Scott's email link lands on PDF123 (Scott's invoice)

Nick's email link lands on  PDF456 (Nick's invoice)

Mary's email link lands on  PDF789 (Mary's invoice)

 

Scott

Highlighted
Trusted Contributor

Re: Dynamic links in custom xhtml email campaign

Hello Scott,

 

Because of the way documents are filed and stored on our system when uploading, and having no API functionality for retrieving document lists or information to facilitate getting the lists url's it would be difficult to use our library to host the invoices for your purposes. Further, account libraries are limted to 50 MB combined space for images and documents, so the number of invoices you would be able to handle this way would be limited.

 

I would suggest hosting your invoices on your own server or webhost in a static "current invoices" folder or directory. This way, the only thing different among your customers could be the filenames, and a variation on the approach outlined above for dynamic customer-specific links would be applicable. If you provide a static name for current invoice for each customer, you may be able get away with setting the custom fields used for the dynamic link once, so that your monthly email would simply contain a "current invoice" link, and you wouldn't need to update your contacts each month with new data for the custom fields before sending your emails.

 

I hope the above is helpful.

 

Cheers,

 

Mark Coleman
Support Engineer
Highlighted
Occasional Visitor

Re: Dynamic links in custom xhtml email campaign

can click-through tracking be applied when doing it this way?

Developer Portal

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

Visit Page

Register for our "Making Sense of Online Marketing for Education" Webinar

Join us on Thursday, August 27th at 2pm ET for a free one-hour webinar where we will be covering how to incorporate online marketing into your educational marketing strategy.

Read More
Featured