Viewing 15 replies - 1 through 15 (of 15 total)
  • mother.of.code

    (@imazed)

    The Mother of Code

    Hi nowton,

    We’re currently discussing adding this feature to the plugin. I’ll let you know as soon as I know more about it!

    +1

    That would be a cracking feature.

    +1 here, too!

    Colin

    (@colinsafranek)

    +1 Definitely!

    Is there a way to use the mailchimp_sync_user_data filter to achieve this in the mean time?

    Thanks!

    gatta2

    (@gatta2)

    Is it possible to sync user profile field to a group in Mailchimp? We’d like to let people choose different mailing list in the sign up form.

    mother.of.code

    (@imazed)

    The Mother of Code

    Still working on this! We know this is a highly sought after feature and we’re definitely implementing it, but we do need some time. We’ve been working very hard on the biggest update the main MailChimp for WordPress plugin has ever seen and that’s been taking up most of our time, but please know that we’ve heard you and will be working on it.

    Thank you all so much for your patience!

    Hey Ines, any update on groups support?
    It’s pretty much the only thing missing from this otherwise awesome plugin!

    Plugin Author Danny van Kooten

    (@dvankooten)

    Hey all,

    This Interest Group thing is definitely something we’re willing to add to the plugin in some point, however it is a bit hard to work this into the UI at this point.

    That said, I’d love to help you set it up using so-called “filter hooks”. With a few lines of code, you can hook into our plugin and subscribe people to the right Interest Group in MailChimp.

    Here’s an example.

    add_filter( 'mailchimp_sync_user_data', function( $data, $user ) {
    
    	$grouping_1 = array(
    		'id' => 'your-grouping-id',
    		'groups' => array( 'Group 1', 'Group 2' )
    	);
    
    	$data['GROUPINGS'] = array( $grouping_1 );
            return $data;
    }, 10, 2 );

    (this code is added to your theme its functions.php file)

    In this example, replace your-grouping-id with the actual ID of your List its Grouping, which you can find in the overview table on the MailChimp for WP > MailChimp page.

    Below that is an array of the exact group names as they are found in the given grouping. The user will be added to all the groups you specify here.

    If you need any specific help with this, please post a screenshot of the table showing your MailChimp list fields (MailChimp for WP > MailChimp > Scroll down a bit) here and I’ll modify the example for your specific details. ??

    Cheers!

    PS. You can find more code snippet examples for MailChimp for WordPress & its add-ons here.

    Colin

    (@colinsafranek)

    Hi Danny,

    Thanks for your offer to help with specific cases. I’m going to take you up on that ??

    Here is my list details (groupings) screencap.

    There are two main syncing actions I’d like to take place:

        1. First, in the context of the MailChimp Sync addon functionality, when a user becomes a “subscriber” in the wordpress sense (i.e. their user role), I want them automatically added to the “Member” group within the “Membership Status” grouping.

        If their WP user role changes from “subscriber” to anything else, I want them to be removed from the “Member” group and put into the “Paused” group (still within the “Membership Status” grouping).

        2. In the context of a standard mc4wp opt-in form, I would like any visitor (i.e. they are not a WP user) that opts in to my list to be added to the “Subscriber” group within the “Membership Status” grouping.

    How can I accomplish the above?

    I should mention that I am currently using a custom merge tag called “Reason For Opt In” (REASON) to identify which form a visitor uses to opt-in to the list AND I’m using the same REASON merge tag to identify when a visitor becomes a WP user with the role of “subscriber”.

    I have the following filter hook function in my functions.php file:

    // Mailchimp For WordPress User Sync: send "MEMBER" to the "REASON" merge tag:
    add_filter( 'mailchimp_sync_user_data', function( $data, $user ) {
        $data['REASON'] = 'MEMBER!';
        return $data;
    }, 10, 2 );

    I want to continue using the Reason For Opt In to identify which form a visitor uses to subscribe to my list, but I want to stop using that merge tag when syncing WP users, syncing them via Groups instead (and changing their group if their user role changes).

    Does all that make sense?

    Thanks in advance for any help you can provide! It is MUCH appreciated!

    – Colin

    +1 on this!

    I manage dozens of Mailchimp accounts and most of them utilize interest groups. Not being able to sync them defeats the purpose, accept for super basic email lists with email and name.

    Also, Assigning buddypress extra profile fields to mailchimp interest groups would be ideal. Great work on the basic plugin! Liking what I see so far. Looking forward to this becoming more functional.

    I’m willing to hack some code but I’m not very knowledgable with PHP. I could handle copying and pasting the code and swapping out interest group IDs. Is it that simple or do I need to hire someone to write the code?

    Colin

    (@colinsafranek)

    +1 +1 (??)

    Colin

    (@colinsafranek)

    @dvankooten

    Did I misunderstand your post? I thought you meant that we should post our specific questions/examples on this thread for some help on how to implement.

    Should I have posted my question on a different thread or forum?

    Please let me know.

    – Thanks

    +1!

    Colin

    (@colinsafranek)

    So, for those of you still wondering about this, it turns out that @dvankooten (Danny Van Kooten) did post a code snippet nearly in direct response to my above question. It’s here on GitHub, he just never notified me that he had done it or followed up in any way. I think he’s currently MIA, cuz he hasn’t responded on GitHub either. But he did provide a helpful snippet in the above linked repo, along with others as well.

    I was able to accomplish my goal, but now I have encountered another issue.

    I can add my users to custom groupings based on their role, or any other custom criteria, but I can’t figure out how to remove them from the grouping they were previously in.

    For example, I am placing users with the “Subscriber” role into a grouping of “Membership Status: Member”, and placing all other users into the “Membership Status: Paused” grouping. The problem is, if a user’s role is updated, let’s say from “Subscriber” to “Customer”, then my function only adds them to the “Membership Status: Paused” grouping, but does NOT remove them from the “Membership Status: Member” grouping, so now they are part of both.

    I’ve posted my issue about whether removing users from a grouping is possible here on GitHub, but haven’t heard back for 11 days, so I’m not hopeful that anyone is reviewing those issues.

    Hopefully, they’ll eventually reply, either to this thread or to the one on GitHub.

    @cristian95 hopefully this helps some. Good luck.

    Hmm… I’m having trouble getting interest group syncing to work.

    In plugin settings “Mailchimp for WP >> Mailchimp >> My test list” I see:

    Groupings >> Membership
    ID: 6921
    Groups:
    – Free
    – Complimentary
    – Premium
    – VIP

    In functions.php I added the following:


    add_filter( 'mailchimp_sync_user_data', function( $data, $user ) {
    $data['EMAIL'] = $user->user_email;
    $grouping_membership = array(
    'id' => '6921',
    'groups' => array('Free','Complimentary','Premium','VIP')
    );
    $data['GROUPINGS'] = array( $grouping_membership );
    return $data;
    }, 10, 2 );

    But my test user/contact does not get updated with the correct groups in Mailchimp, even when changes for email address works just fine.

    Nothing in log file as well even after enabling debug mode as described in https://mc4wp.com/kb/how-to-enable-log-debugging/

    Any clue?

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘Is it possible to select groups?’ is closed to new replies.