Adding a Tag via API
Include thetag field in your send request:
Adding a Tag via PHP SDK
Use the->tag() method on the email builder:
Automatic Tags from Templates
When you send an email using atemplate_slug, Lettr automatically sets the tag to the template slug on the server. You don’t need to pass a tag yourself — your analytics are grouped by template out of the box.
This also means that each template in the Emails dashboard shows Sent, Opened, and Rate columns, giving you per-template engagement stats without any extra configuration.
Tags in the Dashboard
Tags appear in two places in the Lettr dashboard:Analytics by Tag
The home dashboard includes an Analytics by Tag widget that shows sending stats for the last 30 days grouped by tag — Sent, Opened, and Rate at a glance. Two things to know about how the table is built:- Campaign sends are excluded. Marketing campaigns tag their sends internally, but those rows don’t appear here — campaign performance lives in campaign analytics. The tag table only covers your transactional sending.
- Untagged emails are shown too. Emails sent without a tag are grouped in an Untagged row (shown only when there are untagged sends in the window), so the table always accounts for your full transactional volume.
Analytics Filtering and Breakdowns
On the Analytics page you can use tags in two ways:- Filter by Tag — Show only data for emails with a specific tag. Open the Configure modal, go to the Filters tab, and select “Tag” as the filter type.
- Break down by Tag — Use the “Break Down By” dropdown below the chart to see your metrics split by tag. This lets you compare performance across different email categories at a glance.
Filtering and Breakdowns
Learn more about the Configure modal, filters, and breakdowns
Tag Rules
Tags vs Metadata
Tags and metadata serve different purposes:
Use a tag when you want to group emails in the Analytics dashboard (e.g.,
welcome-series, order-confirmation). Use metadata when you need to attach structured data for webhooks or API queries (e.g., orderId, customerId).
Metadata
Learn how to attach key-value data to emails for detailed tracking