Engagement events

With engagement events on, every send, delivery, open, click, and bounce becomes a PostHog event on the person (while unsubscribe and consent events are recorded with the email address as their distinct ID). You can use them like any other event: in funnels, cohorts, insights, and automation triggers. To see how each send did without building your own insights, use metrics. To learn how these events connect your email to the rest of your product data, see how product data powers messaging.

Turn them on

New projects start with engagement events on. To check, go to Messaging > Settings > Engagement events, and turn on Capture email engagement events. It takes a couple of minutes, and doesn't fill in past sends.

The events count toward your event usage. If you turn them off, you still get metrics.

Events

EventWhen
$workflows_email_sentPostHog handed the email to the email provider.
$workflows_email_deliveredThe person's mail server accepted it.
$workflows_email_openedThe person opened it. Needs open tracking.
$workflows_email_link_clickedThe person clicked a link. Needs click tracking.
$workflows_email_bouncedIt bounced.
$workflows_email_blockedThe person marked it as spam.
$workflows_email_failedIt wasn't sent, or the email provider rejected it.
$workflows_email_unsubscribedThe person unsubscribed.
$workflows_email_tracking_consent_updatedThe person changed their tracking consent.
$workflows_conversionThe person reached an automation's conversion goal. PostHog records it even with engagement events off.

Test sends don't create events.

Each event goes to the distinct ID of the send. An email your code sends uses the distinct_id you pass, or the recipient's email address when you pass none. The events join the person with that distinct ID, or start a new person. A send with no distinct ID creates no events.

Properties

PropertyWhat it holds
$workflow_idThe broadcast or automation that sent it
$workflow_action_idThe email step
$email_toThe recipient
$email_subjectThe subject. Left out for sensitive emails.
$email_transactionalWhether the email was transactional
$email_template_idThe transactional email's template ID, when the send used one
$email_template_keyThe template_key of an email your code wrote
$email_tagsThe tags your code sent with the email, when it sent any
$email_tracking_enabledWhether the send had tracking. On sent and failed events.
$link_urlThe link, on clicks. Only the site address for sensitive emails.
$bounce_typehard, soft, or unknown, on bounces

Unsubscribe and consent events belong to the email address, not to one send. Their distinct ID is the email address, and they have $email and source. An unsubscribe also has category: the category's ID, or $all for all marketing email. When the person used the link in a workflow email, it also has that email's $workflow_id, $workflow_action_id, $workflow_invocation_id, and $workflow_version. A consent event has status: OPTED_IN or OPTED_OUT.

Ideas

  • Did the email work? A funnel from $workflows_email_delivered to your own event, such as password_reset_completed.
  • Who's ignoring you? A cohort of people with no $workflows_email_opened in 90 days, to leave out of broadcasts.
  • Follow up on a click. An automation triggered by $workflows_email_link_clicked on your pricing link.

Still have questions?

Was this page useful?