[SalesForce] Exact Target: Customize unsubscribe link in email

Is there a way to set the 'unsubscribe' link in an email to point to a page on the customer's website than Exact Target's profile center? On this web page, the idea is to determine the user's email address/subscriberkey through some query string parameter, fetch the lists that the user is subscribed to (I got this part using SOAP API), have him select which ones he wants to unsubscribe from and click the submit button to unsubscribe (I got this part also through the SOAP API). The part where I need help is how to change the unsubscribe link in the emails and how to add the emailaddress in the query string? Or is there a way to decode the query string parameter qs='xxxxxxxxxx' which gets included by default, and determine the user from that?
Any help will be greatly appreciated.

Thank you.

Sai.

Best Answer

There are several things you can do:

First. Unsubscribe link is a mandatory link. You cannot eliminate it but you can hide it. This is one of the options:

<span style="display:none;"><a href="%%unsub_center_url%%"></a></span>

Second Use the subscriber ID and email address in the email template you generate. You can use them in the AMPscript part of the email html. You can use them to build a URL to the new page.

%%[SET @clientkey = [_subscriberkey] ]%%
%%[SET @clientemail = [emailaddr] ]%%
%%[SET @clientkeyencoded = URLencode(@clientkey,1,1) ]%%
%%[SET @clientemailencoded = URLencode(@clientemail,1,1) ]%%
%%[SET @URLunsubscribe = Concat("www.something.com/?firstparameter=",@clientkeyencoded,"&secondparameter="@clientemailencoded")

Once you have built the URL you can use it like this in the HTML of the email template. href="%%=v(@URLunsubscribe)=%%

It is more than advisable to encrypt the parameters in the URL, you should not be comfortable having sensitive or personal data in the URL. You have some encrypt/decrypt functions in AMPscript but you could also use Javascript.

Related Topic