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.

Using a URL within a Custom Field

Highlighted
Occasional Advisor

Using a URL within a Custom Field

Hi,

I am passing a URL within a Custom Field that is individual for each contact.  I get the URL to populate in the email when it is sent, but it is displaying the full URL.  Is there a way to have display text for the URL without passing in the url wrapped in an HREF tag?

Thanks,

Julie

1 REPLY 1
Highlighted
Moderator

Re: Using a URL within a Custom Field

Hello,

Thanks for reaching out to Constant Contact API Support.

You are posting on the developer board, so I am going to provide you with information as if you are creating these emails using the API or in Custom Code. If you are using our visual editor, please reach out to our main support team for assistance with this (866-289-2101).

Typically when making a dynamic link, you will have a base URL and only one part of the URL would change for each contact. Here is how you might do this in a custom HTML email. Say the URL for your link is something like this:

http://www.mywebsite.com/?id=123456789

In this example, "123456789" is the unique value that each subscriber has differently in their link. Assuming the data is in the contact field named “Custom Field 1” in Constant Contact, the link would be coded as follows:

<a><a href=”http://www.mywebsite.com/?id=$subscriber.custom.custom_field_1$”>Click Here</a></a>


The reason for the empty <a> tag around the link is to disable our link tracking which would otherwise interfere with the dynamic values. You then would just need to make sure that each contact has their unique parameter value stored in Custom Field 1.

To make sure the dynamic portion of your email is functioning properly, it is highly recommended that you send yourself a live version of the email. Make a copy, and then send it to a list that contains only your email address. Make sure your contact profile contains the proper custom fields in a format that will work with the dynamic link. A live send is necessary because our preview window does not pull in custom fields as there is no contact to reference when previewing.

Please have a look and let me know if you have any questions!

Regards,
David B.
Tier II API Support Engineer

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