I've built out a custom landing page to handle the unsubscribes for our account. This custom landing page performs a master unsubscribe as well as collects the unsubscribe reason.

The issue I've run across is that the unsubscribes are not showing up in the tracking summary for each job but do show up in the data extension that I built to house unsubscribe reasons.

I found this resource: http://help.marketingcloud.com/en/documentation/ampscript/using_ampscript_with_the_web_service_api/unsubscribe_and_log_an_unsubevent_with_a_logunsubevent_execute_call/

The problem I'm having is that this script doesn't seem to pull the JobID so therefore it still won't show up in the tracking summary.

Since I'm sending to Data extensions, I cut bout a good part of the sample script, however I still am not seeing the unsubscribes show up in the tracking summary. Here's the AMP script that I've been using:

%%[VAR @sid, @jid, @lue, @lue_prop, @lue_statusCode, @overallStatus, @requestId, @Response, @Status, @Error

SET @sid = IIF(Empty(RequestParameter("email_address")),RequestParameter("current_email_address"),RequestParameter("email_address"))
SET @jid = RequestParameter("jobid")

SET @lue = CreateObject("ExecuteRequest")

SET @lue_prop = CreateObject("APIProperty")                 
SetObjectProperty(@lue_prop, "Name", "SubscriberKey")
SetObjectProperty(@lue_prop, "Value", @sid)
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_statusCode = InvokeExecute(@lue, @overallStatus, @requestId)

SET @Response = Row(@lue_statusCode, 1)
SET @Status = Field(@Response,"StatusMessage")
SET @Error = Field(@Response,"ErrorCode")]%%
  • Have you verified that the jobid is actually filling into the parameter on your URL? – Gortonington Oct 6 '16 at 17:33

You can pass through the JobID as a parameter to your Landing Page in order for this to work. Try using this as your unsubscribe link (replace xxx with your Landing Page ID)

%%[ set @unsubURL= MicrositeURL(xxx, "jobid", jobid, "listid", listid) ]%%

Use as your unsubscribe link:



Turns out that this question (How can I create an UnsubEvent using AmpScript in a Landing Page) works for what I need. The unsub is being recorded in the tracking summary and for all jobs when someone clicks on the link to the custom unsubscribe page from an e-mail.

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.