3

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.

1 Answer 1

7

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.

5
  • The unsubscribe link check can be disabled by ET support. Jul 31, 2014 at 10:56
  • Also if you use href="%%=redirectto(@URLunsubscribe)=%% instead of href="%%=v(@URLunsubscribe)=%%, cicks on this URL will get tracked. Jul 31, 2014 at 11:00
  • @Dr.Xavier Thank you! With some tweaks to this code, I was able to create a custom link. Aug 5, 2014 at 4:15
  • @AdamSpriggs I will surely look into your suggestions. Thank you! Aug 5, 2014 at 4:15
  • On a kind of unrelated note, not sure why edits on this site have to be atleast 6 characters. I only wanted to change "Contact" to "Concat", but had to tweak some more letters/spaces just to satisfy the criteria for edits :) Aug 5, 2014 at 4:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.