Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Danny van Kooten

    (@dvankooten)

    Hi Harik,

    I’m sorry for the delayed reply, please note that as you are a Premium customer that you can email us using the red button in the bottom right corner of the plugin settings pages. That’ll guarantee a much faster response.

    Now, to get to your questions. Right now it is not yet possible to select a grouping from the interface of the plugin as this is quite complex because of all the various possibilities. It is possible using some custom code though.

    For example, the following snippet will add all your Event Manager sign-ups to a group called “Attendees” in the grouping with ID 4500.

    add_filter( 'mc4wp_integration_events-manager_merge_vars', function( $vars ) {
    
       if( ! isset( $vars['GROUPINGS'] ) ) {
          $vars['GROUPINGS'] = array();
       }
    
       // create a grouping and add it to groupings data
       $grouping = array(
          'id' => 4500,
          'groups' => array( 'Attendees' )
       );
       $vars['GROUPINGS'][] = $groupings_data;
    
       return $vars;
    });

    You can get your real “grouping ID” and the exact name of the group from the list overview on the MailChimp for WP > MailChimp page.

    Hope that helps. If not, let me know!

    Thread Starter Vitaliy Lyubezhanin

    (@harikjr88)

    hmm… i’m not having any luck. I don’t know if this is related.. but i’m getting in the log.

    [2016-03-16 09:41:33] ERROR: Events Manager > MailChimp API Error: FNAME must be provided – Please enter a value

    Plugin Contributor Lap

    (@lapzor)

    Hi,

    Seems like the field FNAME (First name) is setup as a required field in your MailChimp list. Either send a first name or set the field as not required.

    Log in to MailChimp, go to your list, settings, List fields and merge tasks, and untick the Required field at First name field. Does that solve this problem for you?

    Thread Starter Vitaliy Lyubezhanin

    (@harikjr88)

    ah… so event manager will not pass on the first and last name then? only the email?

    Plugin Contributor Harish Chouhan

    (@hchouhan)

    Hello harikjr88,

    What my colleague meant was that you have a field in your list named “FNAME” that is set as required. Being a required field, when data is sent from your website to MailChimp, if the data from “FNAME” is missing, MailChimp will reject the transfer.

    As the first step, I would recommend marking the “FNAME” field in your MailChimp list as not required.

    Thread Starter Vitaliy Lyubezhanin

    (@harikjr88)

    That makes sense..

    But the weird thing is, the name and last name is required in Events Manager, so the user is filling out that information. When they click submit, they are registered for the event, but not in mailchimp..

    Thread Starter Vitaliy Lyubezhanin

    (@harikjr88)

    Thanks. I was finally able to pass information from event manager to MailChimp for WordPress by using this function.

    //Make Mailchimp and Event Manager see the FNAME and LNAME
    add_filter( 'mc4wp_integration_events-manager_merge_vars', function( $vars ) {
    	$vars['FNAME'] = $_POST['first_name'];
    	$vars['LNAME'] = $_POST['last_name'];
    	return $vars;
    });

    So now I need to figure out how to add them to groups to a specific group.

    I tried the above code and I’m not having any luck. The user is passed onto mail chimp but with no group information. Simply, they go into the MAIN list.

    I got the grouping id from Mailchiimp for wordpress settings.

    1. I went to “Your MailChimp Account” (obviously API is filled out).
    2. Clicked on the list
    3. It opened up 2 sections… Fields and Groupings
    4. In Grouping I found the group I want that has the id next to it and I got the group title from the list i found the group name. Here is an image https://snag.gy/iSDmBY

    So my CODE looks like this

    add_filter( 'mc4wp_integration_events-manager_merge_vars', function( $vars ) {
       if( ! isset( $vars['GROUPINGS'] ) ) {
          $vars['GROUPINGS'] = array();
       }
       // create a grouping and add it to groupings data
       $grouping = array(
          'id' => 12xxx,
          'groups' => array( 'Events' )
       );
       $vars['GROUPINGS'][] = $groupings_data;
       return $vars;
    });

    What am I doing wrong? as it’s not working.. ?? any help would be greatly appreciated.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Adding my signups to a group (not only list)’ is closed to new replies.