0

We have an unsubscribe link in the emails that we send out from marketing cloud. But when we click on the subscriber link, that navigates to the preference centre and that gives an option only to update the details. There is no Unsubscribe button in there and the contacts are not getting unsubscribed.

I have got the Unsub link registered from Marketing cloud

http://click.info.abc.com.au/unsub_center.aspx?s=%%ex2;subscriberid%%&j=%%ex2;jobid%%&mid=%%ex2;MemberID%%&lid=%%ex2;listid%%&jb=%%ex2;_JobSubscriberBatchID%%&ju=%%ex2;joburlid%%

Now the issue here is

  1. I am not able to locate this page as this is not available in Cloud Pages
  2. I want to make the Unsubscribe link work so that when the user clicks on the link Unsubscribe happens from the All Subscriber list.

What I am thinking is to create a new Cloud page and try to update the list with Unsubscribe. But I am not quite sure on the code that I need to write behind the page to update the list.

Can anyone give me pointers ?

  • I cannot answer your first question regarding why you land on a different site than expected. However, if you want to write your own logic, here is the start: developer.salesforce.com/docs/… – DonL Oct 21 at 7:01
0

Marketing Cloud requires to have a link to the Profile Center. You can include it in your email by clicking on enter image description here then selecting Profile Center:

enter image description here

Otherwise, if you want to create one click unsubscribe button, you can use this AMPScript code:

%%[
    VAR @sid, @jid, @listid, @batchid, @reason, @lue, @lue_prop, @lue_statusCode, @overallStatus, @requestId, @lue_Response, @lue_Status, @lue_Error


    SET @emailaddr = AttributeValue("emailaddr")
    SET @emailName = AttributeValue("emailname_") 
    SET @subKey = AttributeValue("_subscriberkey")
    SET @jid = AttributeValue("jobid")
    SET @batchid = AttributeValue("_JobSubscriberBatchID")

    /* Set the listId here */
    SET @listid = '21'

    SET @reason = "PUT THE UNSUBSCRIBING REASON HERE"

    SET @lue = CreateObject("ExecuteRequest")
    SetObjectProperty(@lue,"Name","LogUnsubEvent")

    SET @lue_prop = CreateObject("APIProperty")                 
    SetObjectProperty(@lue_prop, "Name", "SubscriberKey")
    SetObjectProperty(@lue_prop, "Value", @subKey)
    AddObjectArrayItem(@lue, "Parameters", @lue_prop)

    SET @lue_prop = CreateObject("APIProperty")
    SetObjectProperty(@lue_prop, "Name", "JobID")
    SetObjectProperty(@lue_prop, "Value", @jid)
    AddObjectArrayItem(@lue, "Parameters", @lue_prop)

    SET @lue_prop = CreateObject("APIProperty")
    SetObjectProperty(@lue_prop, "Name", "ListID")
    SetObjectProperty(@lue_prop, "Value", @listid)
    AddObjectArrayItem(@lue, "Parameters", @lue_prop)

    SET @lue_prop = CreateObject("APIProperty")
    SetObjectProperty(@lue_prop, "Name", "BatchID")
    SetObjectProperty(@lue_prop, "Value", @batchid)
    AddObjectArrayItem(@lue, "Parameters", @lue_prop)

    SET @lue_prop = CreateObject("APIProperty")
    SetObjectProperty(@lue_prop, "Name", "Reason")
    SetObjectProperty(@lue_prop, "Value", @reason)
    AddObjectArrayItem(@lue, "Parameters", @lue_prop)

    SET @lue_statusCode = InvokeExecute(@lue, @overallStatus, @requestId)

    SET @lue_Response = Row(@lue_statusCode, 1)
    SET @lue_Status = Field(@lue_Response,"StatusMessage")
    SET @lue_Error = Field(@lue_Response,"ErrorCode")


]%%

Don't forget to update some details in the code as described in comments. You can find the AllSubscribers list id by going to Email Studio > Subscribers > AllSubscribers > Properties and grab the List ID.

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.