API Unsubscribe - loses unsubscribe tracking per campaign?

eggerda

Member
Hello, I'm working on implementing a master unsubscribe page hosted on my site. I'll pass the email address and "update contact" link.

Then this page will use the mailwizz API to unsubscribe the contact when hitting the submit button using the email address inside the text box.

I'm seeing a potential/minor issue where the API doesn't have a field for taking in the campaign UID to track the unsubscribe back to the specific campaign the user is unsubscribing off of.

Is anybody using the unsubscribe API - and are there any other fields available I might be missing? Or is it just "email address" and list id?

I'd like to track unsubscribes back to the campaign if possible - but I don't think it is.

Thanks!

Dan

@twisted1919
 
@twisted1919 ah! I didn't see that method.

We are using the "unsubscribe from all lists" API call. Would we call this unsubscribe tracking method AFTER the unsubscribe all API runs?
 
We are using the "unsubscribe from all lists" API call
This will unsubscribe the subscriber BUT will not log in a campaign that the subscriber has unsubscribed.
This is good to have in case your subscribers unsubscribe NOT because of a campaign.

Would we call this unsubscribe tracking method AFTER the unsubscribe all API runs?
I'd say before.
 
We are doing some testing with this @twisted1919 - we are using the Track campaign unsubscribe API call along with the Unsubscribe subscriber from all lists.

On our custom page, the user will click submit with their email address in the text box, and it will call both of these API's to unsubscribe them from all lists, and track the unsubscribe for the campaign ID and subscriber ID (both passed to the track campaign unsubscribe API call).

However, the unsubscribe isn't being tracked to the campaign.

Our goal is to:

1) Unsubscribe the person from ALL lists.

2) Track the unsubscribe to the campaign ID passed to the API - if there is one.

Are we going about this the right way to accomplish these 2 goals?

Thanks!

Dan
 
Thanks @twisted1919 and @laurentiu - we just don't see how these 2 API calls are supposed to fit together... we just can't get it to actually track the campaign the unsubscribe came from. Maybe if we do 3 calls? A direct unsubscribe from the list itself, then the tracking unsubscribe to that sub ID and campaign ID< then the unsubscribe ALL api to make sure they are off the other lists too?

Let use know. Thanks!

Dan
 
@eggerda - i tested and it's working correctly, first i run trackUnsubscribe and then unsubscribeByEmailFromAllLists and subscriber has been tracked as unsubscribed in campaign stats also has been unsubscribed from all lists.
 
@eggerda - Here code example:

Code:
// CREATE THE ENDPOINT
$endpoint = new MailWizzApi_Endpoint_CampaignsTracking();

// Track subscriber unsubscribe for campaign
$response = $endpoint->trackUnsubscribe('qj441a8bsw6b6', 'dd033vdja8840', array(
    'ip_address' => '123.123.123.123',
    'user_agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36',
    'reason'     => 'Reason for unsubscribe!',
));


// CREATE THE ENDPOINT
$endpoint = new MailWizzApi_Endpoint_ListSubscribers();

// UNSUBSCRIBE existing subscriber from all lists, no email is sent, unsubscribe is silent
$response = $endpoint->unsubscribeByEmailFromAllLists('MadisonWilson64@apple.gov');
 
might want to update the api docs so others will not run into this issue?
Api docs is only for examples of how to use the API, the logic of how to use these examples is done by each according to their needs.
 
Back
Top