SendGrid Email Tracking: How to Enable It
In this article
Email tracking in SendGrid is enabled per-email by adding the tracking_settings object to your API request, or globally by turning on click and open tracking in your account's Tracking settings. The API method gives you the most control and is the one SendGrid recommends for production. Before you start, you need an active SendGrid account, a verified sender identity (a verified email address or authenticated domain), and an API key with at least Mail Send permission. The exact menu labels in the SendGrid dashboard can differ slightly by version and plan, but the paths below match the current web app.
What You'll Need
- A SendGrid account with a verified sender identity (single sender or domain authentication).
- An API key with Mail Send permission, stored somewhere safe.
- Either the SendGrid web dashboard or a way to make HTTP requests (cURL, Postman, or your own code).
- If you plan to use a custom tracking domain, a subdomain you can add DNS records to.
Step-by-Step
- Decide between dashboard and API tracking. Dashboard tracking applies to every email sent from your account unless you override it. API tracking is set per message and is better when you want to track some emails but not others. You can combine both, but the API setting wins for that message.
- Enable tracking in the dashboard (optional global setting). Log in to the SendGrid dashboard, open Settings in the left sidebar, then choose Tracking. You will see toggles for Click Tracking and Open Tracking. Turn on the ones you want. If you want link branding, set a custom tracking domain here as well; SendGrid will show the CNAME record you need to add at your DNS provider.
- Enable tracking per email via the API. In your Mail Send request body, add a
tracking_settingsobject. For open tracking, set"open_tracking": {"enable": true}. For click tracking, set"click_tracking": {"enable": true, "enable_text": false}. Setenable_textto true only if you want plain-text links rewritten as well. If you use a custom tracking domain, add"click_tracking": {"enable": true, "enable_text": false}plus the domain under your account settings, not inside the message. - Send a test email. Send one message to an address you control with tracking enabled. Open it in a mail client and click a link. Wait a minute or two, then check Activity in the SendGrid dashboard. You should see Opened and Clicked events. If you use the Event Webhook, check your endpoint logs instead.
- Verify the tracking domain (recommended). If you set a custom tracking domain, add the CNAME record SendGrid provides at your DNS host. Wait for DNS propagation, then click Verify in the Tracking settings page. Until it verifies, links may still use the default SendGrid domain and some mailbox providers may flag them.
- Confirm your unsubscribe and preference links. Tracking rewrites links, including unsubscribe links, so test that the unsubscribe flow still works after you enable click tracking. A broken unsubscribe link can hurt deliverability and may violate anti-spam rules in your region.
Common Mistakes
- Expecting open tracking to be exact. Open tracking uses a tiny invisible image. Mail clients that block images, or users who read in plain text, will not register an open. Treat open rates as directional, not precise.
- Forgetting that click tracking rewrites every link. Links inside HTML emails are replaced with a SendGrid redirect. If a link is malformed or points to a local address, the redirect can fail. Test all links before a campaign.
- Turning on global tracking and then wondering why a transactional email is tracked. Dashboard toggles apply account-wide. Use the API setting to disable tracking for sensitive messages such as password resets if your policy requires it.
- Using an unverified sender. Tracking will not help if messages are rejected or land in spam because the sender identity is not verified. Verify a sender or authenticate your domain first.
- Setting a custom tracking domain without DNS access. The CNAME must be added at the DNS provider for the domain. If you cannot edit DNS, leave the default tracking domain in place.
Tips
- Use a subdomain for tracking, such as
click.yourdomain.com, so your main domain's reputation is not affected by link redirects. - Keep
enable_textoff unless you really need plain-text click tracking; it can make plain-text emails harder to read. - If you use the Event Webhook, subscribe to Opened and Clicked events and store them yourself. The dashboard activity feed is useful for spot checks but not for long-term reporting.
- Test with more than one mailbox provider. Image blocking and link scanning differ between providers, and some corporate filters pre-fetch links, which can register a click before the recipient opens the message.
- Document which emails are tracked and which are not. A short internal note prevents confusion when a teammate asks why a receipt shows as opened.
Troubleshooting
If opens or clicks do not appear, work from simplest to most involved. First, resend a test to a mailbox you control and open it in a client that loads images. Check the Activity feed again after a few minutes. Next, confirm the API request actually included tracking_settings with the correct boolean values; a typo such as "enable": "true" as a string instead of a boolean can cause the setting to be ignored. If you are using the dashboard toggles, confirm you saved the change and that the message was sent after the change, not before.
If links redirect to the wrong place, check your custom tracking domain's DNS record and re-verify it in the dashboard. If the redirect fails entirely, temporarily switch back to the default SendGrid tracking domain to isolate the problem. If events still do not show, check that your API key has Mail Send permission and that the message was accepted by SendGrid (a 202 response). For webhook issues, confirm your endpoint returns a 2xx status and that you have subscribed to the right event types. Finally, if nothing works, contact SendGrid support with the message ID from the response; they can trace whether tracking was applied to that specific send.
Frequently Asked Questions
Does SendGrid track opens and clicks by default?
No. Tracking is off unless you enable it in the dashboard or set tracking_settings in the API request. Some plans and templates may have defaults, so check your account's Tracking page.
Can I track only some emails?
Yes. Leave the dashboard toggles off and enable tracking per message with the API. This is the cleanest way to track marketing mail while leaving transactional mail untracked.
Why do my open rates look low?
Open tracking relies on a tracking image. Mail clients that block images, plain-text readers, and some privacy features prevent the image from loading, so opens are undercounted. Clicks are generally more reliable.
Do I need a custom tracking domain?
It is not required, but it is recommended for deliverability and branding. Without it, links use a shared SendGrid domain, which some filters treat less favorably.
Does click tracking change my links?
Yes. Click tracking replaces links with a redirect through SendGrid's tracking domain. The destination is unchanged, but the visible URL in the email becomes the tracking URL.
Can I disable tracking for a single message when global tracking is on?
Yes. Set "open_tracking": {"enable": false} and "click_tracking": {"enable": false} in that message's tracking_settings. The per-message setting overrides the account default.