Skip to main content
GUIDE · INTEGRATION8 min read

Mailchimp E-commerce source webhook setup

Wire Mailchimp's native E-commerce webhooks to TrackLayer so every subscribe, purchase, and unsubscribe flows into the server-side event pipeline — without disrupting Mailchimp's email ownership or your existing automations.

Phase 9.1

Why use TrackLayer alongside Mailchimp

Mailchimp is your email platform. It owns the subscriber relationship, runs your automations, and handles list hygiene. TrackLayer adds server-side ad attribution — sending Purchase, Lead, and subscribe events to Meta CAPI, Google Ads Enhanced Conversions, and TikTok Events API with the hashed email, customer ID, and order context that platforms need to match events to real users.

Mailchimp's own tracking pixels serve the Mailchimp audience dashboard, not the ad platform. If you rely only on Mailchimp pixel events for Meta attribution, you will see lower EMQ scores because Mailchimp does not forward stable identifiers (hashed email, customer_id) in the same way a dedicated server-side layer does.

# The two-channel setup

Mailchimp E-commerce webhook (server-side)
  → TrackLayer source endpoint
  → Meta CAPI / Google Ads / TikTok (full payload)
  → Mailchimp continues to own email automations

Mailchimp Pixel (client-side)
  → Mailchimp dashboard attribution
  → Not sent to ad platforms

Both can run simultaneously. No conflict.
Setup

Step-by-step webhook registration

01

Find your store ID in TrackLayer

Open Settings → Integrations → Mailchimp. Your store_id (m_abc123 format) is displayed at the top. Copy it — it goes into the webhook URL.

02

Open Mailchimp E-commerce Webhooks UI

In Mailchimp, go to Audience → Manage Audience → Settings → Mailchimp E-commerce. You will see a list of existing webhooks or an empty state. Click 'Add webhook'.

03

Register events and point to TrackLayer

Enter the webhook URL: https://api.tracklayer.io/v1/integrations/mailchimp/source/webhook?store_id=m_abc123. Select events: subscribe, ecommerce/order, unsubscribe, cleaned. Leave the campaign ID field blank (TrackLayer does not route by campaign).

04

Set the HMAC secret

In TrackLayer Settings → Integrations → Mailchimp, click 'Generate secret'. Copy the secret value. Paste it into the Mailchimp webhook 'Secret key' field. Save the Mailchimp webhook. TrackLayer will validate HMAC-SHA256(body, secret) on every incoming event.

05

Validate with a test event

Use Mailchimp's 'Send test webhook' button to send a sample subscribe event. In TrackLayer → Settings → Integrations → Mailchimp, check the 'Recent deliveries' log. A 200 response confirms the webhook is connected. A 401 means the HMAC secret does not match. A 404 means the store_id is wrong.

The webhook URL format is:
https://api.tracklayer.io/v1/integrations/mailchimp/source/webhook?store_id=m_abc123

Replace m_abc123 with your actual store_id from TrackLayer. The store_id identifies which merchant context to load for event processing and HMAC validation.

Mapping

Event mapping reference

TrackLayer maps Mailchimp E-commerce webhook events to its native event taxonomy. The mapping is deterministic — every event type has a specific TrackLayer outcome and destination routing rule.

Mailchimp eventTrackLayer eventDestinationsForwarded
subscribesubscribeMeta (Lead), Google Ads (lead), TikTok (CompleteRegistration)true
ecommerce/orderpurchaseMeta (Purchase), Google Ads (conversion), TikTok (checkout)true
unsubscribeunsubscribenone (forward_to_destinations_default: false)false
cleanedemail_invalidnone (suppression signal only)false

The forward_to_destinations_default flag is false for unsubscribe and cleaned because Mailchimp remains the authoritative suppression system. You should not forward opt-out signals to ad platforms — they do not accept them in the same way and it creates unnecessary pipeline load.

Match rate

The match-rate angle

Mailchimp subscribers have already provided their email during list signup. That email — along with customer_id and optional name fields — is included in every Mailchimp E-commerce webhook. When TrackLayer ingests these events, it stores the hashed email and customer_id in user_data and passes them to ad destinations.

The result is higher EMQ (Event Match Quality) scores for Meta CAPI, Google Enhanced Conversions, and TikTok. Hashed email is the highest-lift signal in most ad platform match algorithms, adding approximately +25% EMQ lift compared to events with no contact identifier.

Signal in user_dataSource from MailchimpEMQ liftNotes
hashed_email (md5)email_md5 or email_sha256+25% EMQMailchimp pre-hashes the subscriber email. TrackLayer stores the hash in user_data.email_hash and passes it to Meta CAPI, Google Enhanced Conversions, and TikTok Events API.
customer_idcustomer_id+12% EMQMailchimp's stable customer identifier is stored as external_id. Platforms use it as a deterministic join key for authenticated sessions.
first_name + last_nameFNAME, LNAME+3% EMQForwarded as supplemental signals. Value is incremental — email and customer_id are the primary match drivers.
Troubleshooting

Troubleshooting

Webhook returns 401 Unauthorized

HMAC secret mismatch. The secret saved in Mailchimp does not match the one in TrackLayer. Go to Settings → Integrations → Mailchimp and regenerate the secret, then update the Mailchimp webhook.

Webhook returns 404 Not Found

Unknown store_id. The store_id in the webhook URL (?store_id=...) does not match any TrackLayer merchant. Copy the correct store_id from Settings → Integrations → Mailchimp.

subscribe events are 200 but no leads appear in Meta

The list may not have double opt-in disabled, meaning subscribers are in 'pending' state and Mailchimp does not fire the subscribe webhook until confirmed. Check Audience settings.

ecommerce/order events not firing

Mailchimp fires ecommerce/order only when an order is marked as paid (not just created). Make sure your order status workflow transitions to 'paid' and that the Mailchimp E-commerce integration is connected to the store.

dedup check shows low event overlap between Mailchimp and CAPI

Mailchimp hashed_email is md5 by default. TrackLayer stores it as-is. Meta CAPI accepts md5 hashes — confirm the hash format is consistent across all sources (hashed_email in user_data should match md5).

FAQ

FAQ

Why use TrackLayer alongside Mailchimp?

Mailchimp owns your email relationship and should keep owning it. TrackLayer adds server-side event delivery to Meta CAPI, Google Ads Enhanced Conversions, and TikTok Events API — destinations Mailchimp does not optimize for. The two systems are complementary: Mailchimp handles email, TrackLayer handles ad attribution.

Does Mailchimp E-commerce require a Mailchimp paid plan?

Yes. Mailchimp E-commerce is available on the Standard and Premium plans. The free Mailchimp plan does not support E-commerce webhooks.

Can I use this if I already have the Mailchimp Pixel integration?

Yes. TrackLayer's Mailchimp source ingests server-side events from webhooks. If you also have the Mailchimp Pixel on the client side, they serve different purposes: the pixel fires from the browser, TrackLayer fires from Mailchimp's own webhook — they are independent channels. Both routes can feed the same Meta CAPI destination.

What happens to unsubscribe events?

TrackLayer processes them for suppression purposes — the contact's email is marked invalid in user_data to prevent future ad events from being sent for that address. However, unsubscribe is not forwarded to ad destinations (Meta, Google, TikTok) by default, since Mailchimp remains the authoritative suppression system.

How quickly do events arrive?

Mailchimp fires webhooks in real time (near-immediate after the action). TrackLayer ingests and processes them within seconds. Destination delivery (Meta CAPI, Google) happens within the normal event pipeline latency (typically under 30 seconds from webhook receipt).

Continue

Next reads

We use essential cookies to keep the site secure and functional. Analytics and third-party tags run only with your consent. See our Cookie Policy.

We use essential cookies to keep the site secure and functional. Analytics and third-party tags run only with your consent. See our Cookie Policy.