Connect a Gravity Form to your MailChimp account with an Opt-in Consent Tag
If you’re working with Gravity Forms on your website and you want to collect captured information in MailChimp for future communications, here’s a quick guide to help you.
Importantly, it’s better for everyone if you have an opt-in consent checkbox to ensure you’re not sending out communications to people in violation of their digital rights.
While you could choose not to store the submissions from those users who haven’t consented to further communication, it feels like an unnecessary loss of data that might be useful for internal purposes.
Here’s a quick step-by-step to show you how you can still collect this information but also make sure you don’t send further communications, unwantedly:
Quick Guide
Steps:
- Install and activate the Gravity Forms and MailChimp add-on plugins.
- Create your form in Gravity Forms and add a consent checkbox.
- Create your audience in MailChimp and make sure you create the same fields in your MailChimp audience as you do for your Gravity forms.
- Create MailChimp tags for ‘Consented’ and ‘Non-Consented’ (or whatever naming you prefer). Note: It’s important that the tags are created in MailChimp because you can only send tags from Gravity Forms that already exist in MailChimp. Ensure the tag naming matches exactly, including capitalization.
- Back in Gravity forms, to record whether the user has consented or not, create two connections in the MailChimp add-on tab of your Gravity Forms settings area.
- The first connection will activate if the consent checkbox was ticked. Add the ‘Consented’ tag to this connection and set the conditional logic to only use this MailChimp connection if the consent form is ticked.
- Duplicate this connection and switch the tag from ‘Consented’ to ‘Non-Consented’. Set the conditional logic to only use this connection if the consent form is not ticked.
Sending from MailChimp
From there you just make sure to filter your audience to those who are tagged with “Consented’ before sending out any mass communications.
Conclusion
This setup will send the form submission to the MailChimp audience and tag it as ‘Consented’ or ‘Non-Consented’ based on the user’s selection.
This way, you can collect email addresses in your mailing list and know which users have consented to opt into your further communications or whatever you asked them to opt into.
We’ve found this to be the easiest way to differentiate Gravity Forms -> MailChimp submissions that have opted in or out of further communications, without having to work directly with the API or create any WordPress hooks.
Addendum
Just a note about if you’re using Gravity forms in AJAX mode.
Depending on how things are set up, you may find that Google Tag Manager isn’t picking up the events sent out by Gravity Forms on a successful submission. In this case, it may be that the window object that the AJAX form is targeting is not the same window object that your Google Tag Manager is attached to. This happens because it’s existing inside a child window object.
What I found can resolve this issue is to make sure you target window.top.dataLayer rather than window.dataLayer when you do your push command.
Creative Digital Agency
Code and Visual works with clients around Australia to create and build outstanding and accessible digital services. If you want to discus a project contact us now for an initial consultation.
Leave a Reply
You must be logged in to post a comment.