Link tracking and UTM tags
PostHog counts opens with a tiny image in each email, and counts clicks by sending links through a redirect. You choose which emails it tracks, and you can tag links so web analytics shows which email sent each visitor.
Opens and clicks
Every automation email step and broadcast email has Track opens and link clicks, on by default. Turn it off for an email that shouldn't be tracked. With it off, PostHog adds no image and doesn't rewrite links. It still records deliveries, bounces, and unsubscribes.
Opens and clicks become PostHog events only when engagement events are on.
Leave one link alone
Some links break when they go through a redirect, such as app deep links and universal links. Add data-ph-no-track to the link's <a> tag, in a Custom HTML block:
The link keeps its address, and PostHog doesn't count its clicks.
Sensitive emails
Transactional emails with sign-in codes or reset links can be marked as sensitive. PostHog then doesn't rewrite their links, so a token never goes through a redirect. See sensitive data and tracking.
Connect clicks to sessions
Connect clicks to sessions, on by default, links each tracked click to the session it starts on your site, including its session replay. It adds a URL parameter to links on the domain you send from and its subdomains. Your site needs posthog-js.
UTM tags
Turn on Add UTM tags to links, and PostHog adds these to each link in the email:
| Tag | Default |
|---|---|
utm_source | posthog |
utm_medium | email |
utm_campaign | The broadcast or automation name |
utm_content | The email step name |
Change any value, or use Liquid in it. Click Save as team default, and new emails start with the same values. You can also set the defaults in Messaging > Settings > UTM tags on email links.
PostHog tags only http and https links. It keeps any utm_ value a link already has, and skips PostHog's own links, such as the unsubscribe link. To leave one link untagged, add data-ph-no-utm to its <a> tag.
Tracking consent
Some countries need a person's consent before you track their opens and clicks. Go to Messaging > Settings > Email tracking consent, and pick:
| Mode | What it does |
|---|---|
| No consent enforcement | Track by each email's setting. The default. |
| Opt-out | Track everyone except people who said no. |
| Opt-in | Track only people who said yes. |
People choose on the preferences page. Consent applies only to marketing email, and never tracks an email that has tracking off.





