Support

Home Forums Event Espresso Premium EE4 MailChimp – add tag along with email after user registers for event

EE4 MailChimp – add tag along with email after user registers for event

Posted: September 5, 2024 at 6:48 pm

Viewing 6 reply threads


calthoracic

September 5, 2024 at 6:48 pm

Hello,

When a user (could be WP member or “guest”) registers for an event, I want to add the email and a specific tag to a MailChimp audience (mailing list). It looks like the MailChimp integration (plugin) can add custom merge fields BUT this is NOT what we need to implement. For members who login to our site, php code can add them to MC audiences with relevant tags but for EE registrants who are not members (who do not login), we are wondering how to implement adding the user’s email and a tag to MC after they register (could be either status: subscriber submitted, registration complete and or approved).

fyi – I did see the following: addons/eea-mailchimp which describes (i believe) the merge fields options.
fyi- Also, we rely on tags to segment our MC campaigns

Best,
Walt


Tony

  • Support Staff

September 6, 2024 at 4:33 am

Hi Walt,

So you are using the EE Mailchimp integration to subscribe the registrants, but obviously don’t want to use merge fields with those, correct?

In that case you can use a snippet to add tags to the subscribe call, at its most basic is:

https://gist.github.com/Pebblo/66f1bcd1963c4a473a156c2fb058eac6

But you can also expand on that and set the tags within a custom field on the event and pull those values into the above snippet, adding those to the subscriber args. That way each event can have a unique tag/tags(s).

Is that what you are looking for?


calthoracic

September 6, 2024 at 10:28 am

Hello Tony,
Thanks for your quick response and providing the ‘FHEE__EE_MCI_Controller__mci_submit_to_mailchimp__subscribe_args’ snippet, I’ll test it… I actually haven’t implemented the plugin yet but was just reviewing it to see if it could work for our use case(s).
Best,
Walt


calthoracic

September 6, 2024 at 1:57 pm

Hello Tony,
I’ve started testing the MC plugin with an Event configured with an appropriate MC List/Audience defined from the dropdown list and no Email Preferences chosen (without any extra PHP “tag” code, I’ll save that for later testing).

I’ve done two separate user registrations. The first user was successfully added to MC List/Audience. The second user was not added to the MC List/Audience (I believe because they were “archived” in MC).

There are no log files being displayed in the MC settings “Logs” tab? I was hoping for log details for both cases (successful addition & error for not adding user to MC Audience/List).

How can I troubleshoot these situations? How do I make sure logging is working?

Best,
Walt


Tony

  • Support Staff

September 9, 2024 at 3:35 am

I’ve done two separate user registrations. The first user was successfully added to MC List/Audience. The second user was not added to the MC List/Audience (I believe because they were “archived” in MC).

Correct, if a user unsubscribes or archives within MailChimp they don’t resubscribe (this is by design within MC itself).

There are no log files being displayed in the MC settings “Logs” tab? I was hoping for log details for both cases (successful addition & error for not adding user to MC Audience/List).

We generally don’t store ‘success’ logs other than those related to payment requests as you’ll bloat your logs with success messages, we store failed requests or those throwing errors.

May I ask what details you looking to gain from the API logs? (The last X API request/responses are available within your MailChimp account)

How can I troubleshoot these situations? How do I make sure logging is working?

Which specific situations? The above doesn’t highlight an issue that we would need to troubleshoot currently.

The first user, worked successfully which shows the add-on is working correctly.

The second user was archived, a subscription call will not unarchive a user, they need to be unarchived first and then subscribed but that’s not something we include in the add-on (if a user was archived/unsubscribed we can’t just force a ‘resubscription’ onto that user).


calthoracic

September 9, 2024 at 11:34 am

Hello Tony,
Thanks for your response and I now understand what does/does not get logged. I’ve implemented the php code to add tags (√ which works) and will add some logic to check the MC user’s status (and can predict if it’s a unsubscribed/archived case).
Best,
Walt


Tony

  • Support Staff

September 10, 2024 at 6:23 am

Awesome! Sounds like its working for you 🙂

Any questions just let me know.

Viewing 6 reply threads

You must be logged in to reply to this support post. Sign In or Register for an Account

Event Espresso