Mailchimp provides URL tracking and personalization features through merge tags and automatic UTM parameters. Understanding these helps you track campaign performance accurately.
Key Takeaways
- 1Mailchimp auto-adds tracking parameters to links
- 2Merge tags personalize URLs per subscriber
- 3mc_eid identifies individual email recipients
- 4UTM parameters integrate with Google Analytics
- 5Goal tracking requires specific URL patterns
“Track link clicks to see how your contacts interact with your campaigns. Enable Google Analytics tracking to see how your email traffic affects your website.”
Tracking Parameters
Mailchimp adds several tracking parameters to links in your emails, each serving a different attribution purpose. Understanding which parameters appear and what they contain helps you analyze campaign performance across your analytics stack.
| Parameter | Purpose | Example Value |
|---|---|---|
| mc_eid | Email ID (subscriber) | abc123def456 |
| mc_cid | Campaign ID | campaign123 |
| utm_source | Traffic source | mailchimp |
| utm_medium | Marketing medium | |
| utm_campaign | Campaign name | summer_sale_2026 |
| utm_content | Link differentiation | header_cta |
The mc_eid and mc_cid parameters are Mailchimp-specific identifiers that power the platform's internal analytics. UTM parameters are industry-standard and integrate with Google Analytics and other analytics tools. When Google Analytics tracking is enabled, both sets of parameters appear on your URLs.
When you send a campaign, Mailchimp automatically rewrites links to add tracking parameters. You do not need to manually add these parameters unless you want to customize or override the defaults.
Automatic Link Tracking
# Original link in email
https://shop.com/products/shoes
# After Mailchimp tracking (auto-added)
https://shop.com/products/shoes?mc_cid=abc123&mc_eid=def456
# With Google Analytics tracking enabled
https://shop.com/products/shoes?utm_source=mailchimp&utm_medium=email&utm_campaign=summer_sale&utm_id=campaign123&mc_cid=abc123&mc_eid=def456Notice how the original clean URL transforms into a parameter-rich tracking URL. The mc_cid identifies this specific campaign while mc_eid identifies the individual recipient, enabling subscriber-level attribution. When GA tracking is enabled, the UTM parameters appear alongside Mailchimp's native parameters.
Merge tags let you personalize URLs with subscriber-specific data. Each tag is replaced with the subscriber's actual data when the email is sent, enabling deep linking to personalized content or pre-filled forms.
Merge Tags in URLs
<!-- Personalize URLs with merge tags -->
<!-- Basic subscriber data -->
<a href="https://shop.com/profile?email=*|EMAIL|*">View Profile</a>
<!-- Result: https://shop.com/profile?email=john@example.com -->
<!-- Subscriber ID -->
<a href="https://shop.com/unsubscribe?id=*|UNIQID|*">Unsubscribe</a>
<!-- Result: https://shop.com/unsubscribe?id=abc123def456 -->
<!-- List and campaign info -->
<a href="https://shop.com/track?list=*|LIST:NAME|*&campaign=*|CAMPAIGN_UID|*">
Track
</a>
<!-- Custom merge fields -->
<a href="https://shop.com/orders?customer_id=*|CUSTOMER_ID|*">
View Orders
</a>
<!-- URL encode merge tags for safety -->
<a href="https://shop.com/search?q=*|URL:FNAME|*">
Search for your name
</a>
<!-- *|URL:FNAME|* URL-encodes the value -->This HTML shows how to embed merge tags directly in link URLs. The *|URL:FIELDNAME|* syntax is important for URL contexts because it URL-encodes the value, preventing broken links when subscriber data contains special characters like spaces or ampersands.
The following table lists commonly used merge tags and their typical output values. You can use these tags in URLs to create personalized links for each subscriber.
Common Merge Tags
| Merge Tag | Description | Example Output |
|---|---|---|
| *|EMAIL|* | Subscriber email | john@example.com |
| *|FNAME|* | First name | John |
| *|LNAME|* | Last name | Doe |
| *|UNIQID|* | Unique subscriber ID | abc123 |
| *|CAMPAIGN_UID|* | Campaign ID | campaign456 |
| *|LIST:NAME|* | List name | Newsletter |
| *|URL:FIELDNAME|* | URL-encoded field | John%20Doe |
The UNIQID tag is particularly useful for creating personalized unsubscribe or preference center links. CAMPAIGN_UID enables dynamic tracking where the campaign name flows into your analytics automatically without manual URL updates for each send.
While automatic tracking covers most needs, you may want to customize UTM parameters for specific campaigns or disable tracking for certain links like legal pages or external partner sites.
Custom UTM Configuration
<!-- Override automatic UTM parameters -->
<!-- Disable tracking for specific link -->
<a href="https://example.com" mc:disable-tracking>External Link</a>
<!-- Custom UTM parameters in template -->
<a href="https://shop.com/sale?utm_source=mailchimp&utm_medium=email&utm_campaign=*|CAMPAIGN_UID|*&utm_content=hero_button">
Shop Now
</a>
<!-- Dynamic campaign name -->
<a href="https://shop.com?utm_campaign=*|SUBJECT|*">
Click Here
</a>
<!-- Combine with merge tags for full attribution -->
<a href="https://shop.com/product/123?utm_source=mailchimp&utm_medium=email&utm_campaign=product_launch&utm_content=main_cta&email=*|EMAIL|*&segment=*|SEGMENT|*">
View Product
</a>The mc:disable-tracking attribute prevents Mailchimp from modifying a link, useful for external URLs where you do not want tracking parameters. For links you do track, combining UTM parameters with merge tags gives you the flexibility of custom campaign naming while still capturing subscriber-level data.
Mailchimp Goals track when email subscribers visit specific pages on your website. When a subscriber clicks through from an email and later visits a goal URL, Mailchimp records the conversion for your attribution reports.
Goal Tracking URLs
// Mailchimp Goal tracking (website goals)
// Requires connected site with Goal tracking code
// Goal is triggered when subscriber visits matching URL
// Configure in Mailchimp: Connected Sites > Goals
// URL patterns for goals:
// 1. Exact match: https://shop.com/thank-you
// 2. Starts with: https://shop.com/checkout/*
// 3. Contains: purchase=complete
// Landing page for goal tracking
// The mc_eid parameter links the visit to the subscriber
// https://shop.com/thank-you?mc_eid=abc123
// Server-side goal tracking
const mcEid = req.query.mc_eid;
if (mcEid) {
// Store mc_eid in session
req.session.mcEid = mcEid;
}
// On conversion, the goal is auto-tracked if:
// 1. URL matches your goal pattern
// 2. mc_eid cookie is present (set by Mailchimp tracking)Goal tracking relies on the mc_eid parameter to link website visits back to specific subscribers. When a subscriber first lands on your site from an email, Mailchimp's tracking code stores this identifier in a cookie. Later goal page visits are attributed back through this cookie even if the URL no longer contains mc_eid.
The Mailchimp API lets you manage lists, campaigns, and subscribers programmatically. API URLs include your datacenter identifier (like us1 or us7) which you can find at the end of your API key.
API URL Patterns
// Mailchimp API URL structure
// Base URL includes datacenter (us1, us2, etc.)
const baseUrl = 'https://us1.api.mailchimp.com/3.0';
// Common endpoints
const endpoints = {
lists: '/lists',
listMembers: '/lists/{list_id}/members',
campaigns: '/campaigns',
reports: '/reports/{campaign_id}',
automations: '/automations'
};
// Example: Add subscriber
const response = await fetch(
`${baseUrl}/lists/${listId}/members`,
{
method: 'POST',
headers: {
'Authorization': `Bearer ${apiKey}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
email_address: 'subscriber@example.com',
status: 'subscribed',
merge_fields: {
FNAME: 'John',
LNAME: 'Doe'
}
})
}
);
// Webhook URL configuration
// Settings > Webhooks > Add webhook
// https://yourapp.com/webhooks/mailchimp?key=secret123The API endpoint structure follows a standard REST pattern with version prefix and resource names. Note the datacenter prefix in the base URL, which routes your requests to the correct Mailchimp infrastructure. Webhook URLs for receiving events from Mailchimp go in the opposite direction, pointing Mailchimp to your server.