Overview
Mailgun tags are custom identifiers you can attach to your email messages. They serve as metadata that help you categorize, track, and analyze your email communications. Tags are a powerful feature that allow you to organize your email traffic and gain valuable insights into your email performance.
Tag limits
To ensure optimal performance and prevent misuse, Mailgun enforces the following limits on tags:
- Account Limit: Maximum of 100,000 unique tags per account
- Message Limit: Maximum of 10 tags per individual email message
- Time-To-Live (TTL): Tags expire after 30 days, but the data persists. Data on expired tags can be accessed at any time by re-adding the expired tag to your account
How tags work
When you send an email through Mailgun, you can attach one or more tags to the message. These tags are stored with the message data and can be used for filtering and organizing your email analytics.
For detailed information on implementing tags in your email communications, please refer to our API documentation.
Common use cases for tags
- Campaign Tracking: Track different marketing initiatives (e.g., "summer-sale-2025")
- Customer Segmentation: Analyze how different user groups engage with emails (e.g., "premium-tier")
- Content Classification: Identify performance by email type (e.g., "newsletter," "transaction-confirmation")
- A/B Testing: Compare performance of different email versions
- Geographical Targeting: Monitor regional engagement patterns
Best practices for using tags
- Be Consistent: Establish a naming convention for your tags and stick to it.
- Be Specific: Create tags that are specific enough to be useful for analysis but not so granular that you hit your account limit.
- Monitor Usage: Keep track of how many unique tags you're creating to avoid approaching the 100,000 limit.
- Combine Strategically: When using multiple tags per message (up to 10), ensure they provide complementary rather than redundant information.
- Clean Up: Periodically review and remove unnecessary tags to keep your account organized.
Need Support?
Our Support Team here at Sinch Mailgun is happy to help! Reach out to us in the Support page of your Mailgun Control Panel, and we'll be with you shortly!