Back to main menu


Email tags explained: Gaining useful insights from segmentation

Companies often use the same sending domains or IP addresses to send various types of messages. While this is a really convenient way to send messages, it can be hard to figure out how each message type is performing. The solution? Tag your emails, we’ll tell you how.



Companies often use the same sending domains or IP addresses to send various types of messages. While this is a really convenient way to send messages, it can be hard to figure out how each discrete message type is performing. This is where the idea of tagging or categorizing your emails comes into play.

What is an email tag?

An email tag is a particular label you attach to a message to identify or categorize it. By assigning a tag, you’re able to organize your email analytics so you have access to more precise and detailed insights.

Using tags is a technical tactic to take for your email marketing. When you add tags, you increase your control over monitoring the performance of your email campaigns, as well as your transactional email messages.

The great thing about tags is that you have complete control over what categories you use. You can label an email “45729” or “Shipping Notification B” – it doesn’t matter how you organize your messages as long as it’s meaningful to you.

Tags are created on the fly with a simple o:tag parameter. You don’t have to worry about setting up a tag in Mailgun before you use it. As soon as you send an email with a new tag, Mailgun automatically begins tracking the performance for each and every message that follows. Here are the docs you need to start adding tags to your emails.

By default, every Mailgun sending domain can have up to 5,000 active tags (with more available upon request). This allows you to track each message type and version you send through the platform. Each email can be associated with up to three different tags, giving you multiple levels of segmentation.

Tracking your messages with email tags

Everyone likes to measure the impact of their marketing campaigns, but transactional emails usually don’t get as much love. Many businesses are missing an opportunity by not monitoring the impact of their transactional messages or planning tests to improve performance.

Common transactional messages such as signup confirmations, password resets, and receipts are an extension of your product. So it makes sense to ensure that they’re performing at an optimal level. With tags, you can see how users are engaging with these notifications and experiment with different variations to refine the content of these messages.

Tags give you a simple way to start measuring the success of every email you send. Because the tagging system is extremely flexible, you can implement it in the way that best suits your needs.

To take advantage of Mailgun’s analytics features, we recommend adding at least one tag to every message. You’ll be able to track your delivery rate, unique opens, unique clicks, and a number of other metrics for each tag in the analytics tab.

Now that you know what tags are and how they help you track performance, let’s dive into some possible ways to use them effectively.

How to create meaningful segmentation with tags

Tags make it possible to A/B test your messages, compare variants to one another, and determine the winner. Through the use of tags, you can experiment with button placement, call-to-action text, color, font sizes, or anything else you might wish to split test in your emails.

If you’d like to test multiple variants of the same type of email, you can tag the message with both a category and version identifier. With both of these tags in place, you’ll get stats that show the performance of the category as a whole as well as the performance of each variant.

For transactional messages, we suggest that you create descriptive tags such as “password-reset”. When you version a message, simply add another tag, like “password-reset-ver1”. This lets you review the analytics for all password resets and for the different versions you may be testing.

Tagging for service providers

Tagging is an especially useful tool for service providers that send millions of emails each month on behalf of their customers. Much like an email service provider (ESP), these companies have to ensure their customers are adhering to acceptable sending practices and are not in violation of the AUP.

If you’re a service provider, we recommend that you tag messages with a unique identifier specific to each customer. These tags give you the ability to report on individual customers, even when you’re having to use shared sending domains.

Using Mailgun’s more flexible uniqueness calculation for accurate insights

Mailgun uses a more flexible uniqueness calculation so you can get more useful insights from tags. A unique open or click was previously recorded once per recipient and tag pair. In other words, if you were using the same tag across multiple messages, only a single unique open or click would have been recorded for a given recipient.

We have updated the uniqueness calculation to take into account the message identifier. This allows unique opens and clicks to be tracked on a per message basis, which means you’ll get to review tag performance with a great deal of accuracy and granularity.

Segmented test dashboard

Choosing the winning message

When you tag your messages correctly, it’s easy to find out which message type is performing best. Using the comparison feature in the analytics section of the dashboard, you can compare the performance of one or multiple tags and choose the version that drives the best results.

For more info on tagging, check out this section of our user manual or this part of our API reference.

Once you have your winning message, don’t stop there. There are a lot of other techniques you can use to optimize your email program. From helpful integrations to list management, handling unsubscribes, and adding automation – the information can be overwhelming. We get it, email is a beast. We can help.

If you need some help getting up and running with Mailgun, watch our training and Q&A session, Getting Started with Mailgun! In this live webcast, Chris Hammer, Mailgun’s Team Lead of Customer Support, walks you through the setup process and helps you find the resources you need to send, receive, and track your messages.

Sign Up

It's easy to get started. And it's free.

See what you can accomplish with the world’s best email delivery platform.

Related readings

Email metrics explained: Understanding email performance

A trip to your email analytics dashboard usually comes before a team meeting or after a product owner asks how many email subscribers are viewing content on a mobile device...

Read more

COVID-19 survey: How the pandemic has affected email sending

By now, we’re all well aware of the effects COVID-19 has had on communication over the past year...

Read more

Mailgun for non-devs: Leveraging an email marketing platform

This guest post comes from Ongage, a front-end email marketing platform that integrates nicely with ESPs like Mailgun and empowers...

Read more

Popular posts

Email inbox.

Build Laravel 10 email authentication with Mailgun and Digital Ocean

When it was first released, Laravel version 5.7 added a new capability to verify user’s emails. If you’ve ever run php artisan make:auth within a Laravel app you’ll know the...

Read more

Mailgun statistics.

Sending email using the Mailgun PHP API

It’s been a while since the Mailgun PHP SDK came around, and we’ve seen lots of changes: new functionalities, new integrations built on top, new API endpoints…yet the core of PHP...

Read more

Statistics on deliverability.

Here’s everything you need to know about DNS blocklists

The word “blocklist” can almost seem like something out of a movie – a little dramatic, silly, and a little unreal. Unfortunately, in the real world, blocklists are definitely something you...

Read more

See what you can accomplish with the world's best email delivery platform. It's easy to get started.Let's get sending
CTA icon