We created a Mailchimp tag for the Google Tag Manager server container to help integrate sites and Mailchimp. With the help of this tag, you can use the Google Tag Manager server container to send events to Mailchimp, create or update contacts, or do both simultaneously. The main benefit of using this tag is that you can add new users. Previously it was only possible by backend developers. It means that you can fully connect your site to Mailchimp using Google Tag Manager, no developers needed.
What is Mailchimp
Mailchimp is a popular email marketing service that’s issued by thousand of marketers and website owners. Mailchimp web and mobile apps have integrated features such as scheduling emails, multi-step sends, sending auto-reply emails to unknown senders, user management, and user statistics. Mailchimp is one of the most successful companies in its industries. Thousands of companies are using MailChimp for their email marketing. That is why we created a tag for the Google Tag Manager server container that helps to connect the site to Mailchimp.
Server-side tagging for Mailchimp
It’s never been easier to integrate Mailchimp. All you need to do is set up the Google Tag Manager server container and configured the events and parameters you want to send to Mailchimp. If you’ve already set up Facebook Conversion API using GTM, most likely, you already have all the required parameters and events inside the web and server container. You can set up Mailchimp integration in minutes without the need for developers’ help.
Mailchimp tag for Google Tag Manager can help you build an integration quickly. This automation will scale your revenue and processes. It will help you decrease hours of manual work. With the help of the Mailchimp tag for the Google Tag Manager server container, you can integrate Mailchimp easily and eliminate tasks that previously took hours of work and weeks to release.
How Mailchimp tag for Google Tag Manager server container works
I will start with describing all fields and features of the Mailchimp tag. You can add the Mailchimp tag to your server container from the server template gallery or by clicking this link.
Mailchimp tag for server container has these features:
- Track event
- Create or update contact
- Create or update contact and track event
All these options require a user email that is hashed with MD5. Mailchimp Marketing API uses the MD5 hash of the lowercase version of the contact’s email address for API calls. You can use Data Tag and Data Client to send users an email that is hashed with MD5.
Mailchimp tag allows adding merge tags. You can use merge tags to send personalized emails to your audiences. Merge tag looks like text that is wrapped in special characters: *|EXAMPLE|*. For example, you can use a merge tag to insert a user’s email dynamically, and when your customer opens the email, they will see their name. You can also send a link to your site inside the merge tag and use it, for example, for abandon cart emails. You will send a link to a product that the user added to the cart but didn’t purchase.
Tag also allows sending events together with events parameters. With the help of events and parameters, you can segment your audience or create triggers. For example, you can send an event when the user subscribed to the newsletter, and in the event parameters add information about what newsletters they want to receive.
How to connect your website to Mailchimp using Google Tag Manager server container
To connect Mailchimp to your site, you will need a configured Google Tag Manager server container.
2. Add custom subdomain. This step is highly recommended but not required.
3. Define what events, event parameters, and user parameters you want to send to Mailchimp. I will show how to send these parameters from the web to the server container using Data Tag and Data Client in the following steps.
4. To add a Data Client download a Zip file from GitHub -> click on templates inside the Server container -> click “New” on the Client Templates section -> click on the three dots on the top right corner -> click import.
5. To add Data Tag download a Zip file from GitHub -> click on templates inside the Web container -> click “New” on the Tags Templates section -> click on the three dots on the top right corner -> click import.
6. This example will show how to add a new user to the Mailchimp list on a successful purchase. This user will be added to the Mailchimp list together with the product information. You can use this information, for example, to create up-sell and cross-sell campaigns.
I have dataLayer inside the Web Google Tag Manager container that sends user and purchase information. First of all, I will need to create dataLayer variables that will capture parameters that I want to send to Mailchimp: user email, first name, last name, product name, id, sku, and category.
7. I will set up Data Tag inside the Web container to pass these variables to the Server container. Create new tag -> tag type Data to GTM Server Side -> select event type -> add GTM Server Side URL and GTM Server Preview HTTP header (you need it to see Data Tag requests inside the server container) -> add user and event parameters. Once done, click save, open Web and Server preview modes, and check that the Server container sees the information you’ve sent using Data Tag.
You should send the user email in two ways: one should be hashed with MD5, add it in the User Data, and the second one should be sent inside the Event Data without any transformation.
8. In this step, I will create variables inside the Server container to capture user and event parameters sent from the Web container using a Data Tag. Create new variables -> type Event Data -> add Key Path
9. Create a new tag inside the Server container -> Add Mailchimp tag to the server container using this link to the server template gallery-> tag type Mailchimp -> select event type -> add list ID and Mailchimp API Key -> Add Contact information and Event information -> Click save. Once done, open Web and Server preview mode and check that the Mailchimp tag worked and contact was added to the Mailchimp list.
10. Publish web and server containers.
Using the Mailchimp tag for the Google Tag Manager server container, you can add new users and track events for existing users. It will help you to grow your subscription list and increase sales. The biggest benefit of this tag is that you can set up this integration without developers’ help, all done inside Google Tag Manager Web and Server interface.
If you want to test what the GTM server is and how it works, please register an account.
If you need help setting up a GTM server account on your website, contact us right away!