Tracking selection/deselection of groups within a list

63 views
Skip to first unread message

Curtis P

unread,
Feb 7, 2014, 6:55:28 PM2/7/14
to mailchimp-...@googlegroups.com
I tried to search for this question but didn't have any luck so my apologies if this has been answered. Can webhooks be used to track selection and deselection of various groups? For example, a user receives a message from a MailChimp campaign sent to a certain group or groups, clicks 'update subscription preferences' link at the bottom of the message (versus 'unsubscribe from this list') and adds themselves to Group B (selects) and removes themselves from Group F (deselect).

Will a webhook tell me specifically which group was selected and which group was deselected?

Thanks...

Brian

unread,
Feb 7, 2014, 7:35:47 PM2/7/14
to mailchimp-...@googlegroups.com
Hey Curtis! Most definitely! Webhooks will give you information about events happening on your list(including profile updates which would cover your group changes inquiry) as they happen. You'd setup the webhook for your list in MailChimp, decide which events you'd like to receive data about, and provide a valid URL for us to send the data to. RequestBin is a great tool to test out webhooks and see some of the data we'd be passing over if you'd like to play around with it first! :)

Here's also a couple of other resources on webhooks as well if you'd like to check them out:


What are Webhooks and how can I set them up?: http://eepurl.com/xduoz

-Brian

Curtis P

unread,
Feb 10, 2014, 11:30:39 AM2/10/14
to mailchimp-...@googlegroups.com
Thanks Brian! 

I really appreciate the reply and information. I will check it out.

Curtis

Curtis P

unread,
Feb 10, 2014, 12:29:23 PM2/10/14
to mailchimp-...@googlegroups.com
Hmm, thought I posted this question but it seems missing. If this is a double post, please forgive me.

I created a RequestBin URL, setup a webhook, and using my profile ran a test, adding myself to a group I did not belong to (checked the box) and removed myself from a group I did belong to (unchecked the box) and clicked save.

This triggered a post to the RequestBin URL (yay) and I'm trying to understand the resulting data set. I suspect the following two lines tell me which group was selected and which was deselected:

data[merges][GROUPINGS][1][id]: 11145
data[merges][GROUPINGS][0][id]: 10473

I'm reading this as 1 = true (selected) and 0 = false (deselected). What I can't determine is where in MailChimp I figure out the group name that id 11145 or id 10473 belong to?

Am I on the right track? Thanks for any guidance you can provide.

MailChimp Support

unread,
Feb 10, 2014, 4:39:43 PM2/10/14
to mailchimp-...@googlegroups.com
Have you tried retrieving the interest groupings from your account via the API directly? http://apidocs.mailchimp.com/api/2.0/lists/interest-groupings.php
This should be able to help clarify the IDs available for the groups, their positions in the array(s), and their names.

-- Anna

Paul Campbell

unread,
Feb 17, 2014, 6:27:34 AM2/17/14
to mailchimp-...@googlegroups.com
Hi, I had a similar question to this. It seems that the webhook post sends an array of groups that the user is signed up to, but doesn't indicate which ones have changed.

Is there a way to do this, or am I going to have to compare that set with the data I have in my system to try and work out which groups have been added/removed for that user?

Tyler

unread,
Feb 17, 2014, 6:40:36 AM2/17/14
to mailchimp-...@googlegroups.com
Hi Paul,

That's correct. Webhooks will pass information as it is changed, but determining which groups have been added / deselected will require a comparison against your own database.

-Tyler

Paul Campbell

unread,
Feb 17, 2014, 7:12:39 AM2/17/14
to mailchimp-...@googlegroups.com
Ok thanks Tyler.

Another question around this - It passes the "grouping" list as an array with IDs which is great, but groups within that grouping are just passed as a text string of names - is there any reason that these aren't passed as separated unique IDs?

Cheers,
Paul

Tyler

unread,
Feb 17, 2014, 8:29:09 AM2/17/14
to mailchimp-...@googlegroups.com
No problem Paul!

The text strings being returned are the unique ids. We don't support duplicate names within the same grouping.

-Tyler

Curtis P

unread,
Feb 18, 2014, 5:18:45 PM2/18/14
to mailchimp-...@googlegroups.com
Paul, glad to hear I'm not the only one struggling with this. It would be a really nice feature if group selection/deselection were tracked and reportable from MailChimp.

MailChimp Support (Tyler/Anna), is the originating MailChimp IP address always the same? IE my systems administrator would like to allow the traffic from only one IP into a webserver/URL we would setup to collect the webhook data.

Thanks!


On Friday, February 7, 2014 3:55:28 PM UTC-8, Curtis P wrote:

MailChimp Support

unread,
Feb 19, 2014, 7:47:20 AM2/19/14
to mailchimp-...@googlegroups.com
Hi Curtis,

We strongly recommend not hard-coding these IPs whenever possible since they can (and will) change without notice. Your best bet would be to consider just using https + a secret key.

-Tyler
Reply all
Reply to author
Forward
0 new messages