Table of Contents
- 1. Overview
- 2. To Create a Subscribe Link using Customer Key
-
- 2.1.1. Example
- 2.1.2. Testing the Link
-
- 3. Related
Overview
In a realm with Customer Key enabled, your Subscribe Link must submit a unique identifier for each contact. Customer Key is only available on some systems.
To Create a Subscribe Link using Customer Key
- Go to CONTACTS > SUBSCRIPTION FORM WIZARD.
- Select a List.
- From Generate select 'Subscribe Link'.
- Select the Default Format, which will determine the prefered email format: Multipart MIME, HTML, Plain Text.
- Enter a Goto URL for the landing page. If no landing page is defined, the form will use the Landing Page defined in your List properties. If no Landing Page is defined, the contact will see a default platform welcome page.
- Enter an Error Landing Page. If no landing page is defined, the form will use the Landing Page defined in your List properties. If no Landing Page is defined, the contact will see a default platform error page.
- Click NEXT.
- Select the link code and paste into a text editor to customize it if necessary. The Customer Key tag will be automatically included in the link code.
- Test the link, then place the link code iinto your message content.
Example
The following is an example of how the link code will appear, where [siteURL] is the URL of your domain, [slid] is the special list id, [format] is the preferred email format, [gotoURL] is the success Landing Page, and [errorURL] is the Error Landing Page.
%%set email = { {urlencode $email} }%% Click to <a href="http:// [siteURL]/bin/listctrl?c=subscribe&s=[slid]&customer_key=%%$customer_key%%&e=%%$email%%&f=[format]&g=[gotoURL]&err=[errorURL]">Subscribe %%$email%%</a> to this list
The 'set' command at the beginning of the link code is used to encode a contact email address. This is for cases where a contact has the '+' (plus) character in their email address. While it is a valid character, it can cause URLs to break because the character is interpreted as a space in a hyperlink.
If you wish to use the link in your site instead of as part of your email message, you can leave out the 'set' command, then replace the %%$customer_key%% and %%$email%% tags with your site code to insert the contact customer key and email address.
Testing the Link
Once you have created a link, test it to ensure it is functioning as expected. To test your subscription link:
- Copy the HTTP link portion from the link code. For example:
- http:// mydomain.com/bin/listctrl?c=subscribe&s=1234&customer_key=%%$customer_key%%&e=%%$email%%&f=mime&g=http:// mysite.com/welcome.html&err=http:// mysite.com/error.html
- Replace the %%$customer_key%% tag with your test customer key.
- Replace the %%$email%% tag with your test email address.
- Paste the customized URL into your browser and click GO. Verify the expected landing page is displayed.
- If you have Subscription Confirmation required in your List properties, you will receive an email with a link to confirm your subscription. Click the link to subscribe.
- Login to your realm.
- Go to CONTACTS > SEARCH FOR CONTACT.
- Enter the Email address submitted above, then click SEARCH.
- Double click the contact record to view the details.
- Validate the Contact and Custom Data, and verify the subscription was created in the Subscription tab set to the expected format.
You can also test the link by adding the link code to your message content and then sending a copy of the message to yourself and clicking the link. The %%$customer_key%% and %%$email%% tags will automatically fill with the data from your contact record.