In this guide
- Send the sign-up to Mailchimp from the server, so the API key is never in the browser.
- Use the subscriber hash (MD5 of the lower-case e-mail) and set the status according to your consent rules.
- Test with a new e-mail and check the audience in Mailchimp.
Most sign-up forms talk directly to Mailchimp's hosted forms or to a plugin. If your form is custom, or you want a sign-up on your site to feed Mailchimp, your ad platforms and your CRM at once, a server container is a neat place for it. This page explains the API call, the details that cause errors and the consent points. Check Mailchimp's Marketing API documentation for the current endpoints. See first-party data and customer data collection.
What you need
| Item | Where from |
|---|---|
| API key | Mailchimp account, Extras, API keys |
| Data centre prefix | The part after the dash in the key, such as us21 |
| Audience (list) ID | Audience settings, Audience name and defaults |
| The sign-up event | Your site pushes sign_up with the e-mail and the consent flag |
Runs on your domain, anywhere
Your tracking runs on your own domain, so a visit from any country is handled the same way.
The API call
To add or update a subscriber, send a PUT request to the audience's members endpoint using the subscriber hash, which is the MD5 of the lower-case e-mail address. PUT creates or updates, so repeated sign-ups do not fail.
PUT https://us21.api.mailchimp.com/3.0/lists/{LIST_ID}/members/{MD5_OF_LOWERCASE_EMAIL}
Authorization: Bearer {API_KEY}
{
"email_address": "[email protected]",
"status_if_new": "subscribed",
"merge_fields": { "FNAME": "Jane" },
"tags": ["website"]
}In the server container
Receive the sign-up event
The web container sends sign_up with the e-mail to your tagging subdomain.
Check consent
Only continue if the visitor agreed to marketing e-mail.
Compute the hash
Use a variable that makes an MD5 of the lower-case e-mail, or a template that does it.
Send the request
Use an HTTP request tag or a Mailchimp template, with the API key in a secure variable.
Handle errors
Log the response. A 400 usually means an invalid or already-unsubscribed address.
Check your tracking in one pass
This is an example. Run the check on your own site to see where yours stands.
Consent and double opt-in
- Use
status_if_newofpendingfor double opt-in, so Mailchimp sends a confirmation e-mail first. Usesubscribedonly where single opt-in is valid for you. - Never re-subscribe someone who unsubscribed. Mailchimp will refuse, and you should not try.
- Record the consent source and date, in a merge field or tag.
- Keep marketing consent separate from tracking consent.
Common problems
Why do it from the server
The API key stays secret, you can add the subscriber and send the sign-up to Meta and Google in the same container, and you keep the consent logic in one place. With Open Tracked, the Enricher can also remember the hashed e-mail so later events from the same browser reach the ad platforms with a good match. See the Enricher.
A realistic example
A small publisher has a newsletter sign-up box on every article. It used to send sign-ups straight to Mailchimp from the browser, so its API key sat in a script anyone could read, and the sign-up never reached its ad platforms. It moves the call to its server container. The container checks the consent box, adds the subscriber with double opt-in and a source tag, and sends a sign-up event to Meta and Google with the hashed e-mail. A month later the list has grown by about the same amount, the API key is safe, and the ad platforms can build audiences from people who joined. One small change gave the team security, consistency and a better audience seed in a single step.
Watch events arrive, live
A sample feed. In Open Tracked you see the same stream for your own store.
Frequently asked questions
Can I add Mailchimp subscribers from a server container?
Yes, with an HTTP request to the Marketing API using the subscriber hash.
What is the subscriber hash?
The MD5 hash of the lower-case e-mail address.
How do I use double opt-in?
Set status_if_new to pending so Mailchimp sends a confirmation e-mail.
Where should the API key live?
In a secure variable on the server, never in the browser.
Do I need consent?
Yes, for marketing e-mail. Check it before you send.
Do I need spreadsheets to read my results?
No. Once tracking is live, the Open Tracked analytics shows spend, revenue, ROAS and profit, and you can ask Ari, the built-in AI assistant, questions about your own numbers in plain words. Ari's allowance depends on your analytics plan.
Is Open Tracked different from Open Track or Open Space Track?
No. Open Tracked is the official name of our server-side tracking platform, and the website is opentracked.io. Many people search for it as Open Track, OpenTrack or Open Space Track. All of them lead to the same product: server-side Google Tag Manager hosting, first-party analytics and a CRM pipeline.

Fix your tracking at the source
Open Tracked hosts your server-side Tag Manager, keeps first-party cookies alive and shows what each ad is really worth.
The Open Tracked team
We build Open Tracked: server-side tracking hosting, analytics and the tools around them, for stores that spend on ads. Questions about this guide, or an idea for the next one?
Comments
Loading comments...
