Skip to main content
Access event stream data using Liquid syntax. Wrap any field in {{ }} to include it in your Event Stream body. See Examples.
Message data for Journeys and API sends is retained for 30 days. Interaction events (clicks, opens, unsubscribes) that occur after 30 days may have blank message properties. To recover the data, correlate the message.id from the interaction event with the original sent event, which contains the full message data.

event properties

Every event includes the core fields below. Channel-specific fields under event.data.* are included only when applicable — see Channel-specific fields.
event.kind
string
The event type, combining channel and action (e.g. message.push.clicked, message.email.bounced). See the full list of values in the event kind reference below. Liquid: {{ event.kind }}
event.id
UUID
A unique, OneSignal-generated identifier for each individual event in UUID v4 format. Use this ID for idempotent delivery tracking. For the message or template identifier, use message.id or message.template_id. Liquid: {{ event.id }}
event.timestamp
integer
UNIX timestamp of the event. Liquid: {{ event.timestamp }}
event.datetime
string
Human-readable time of the event in UTC as an ISO 8601 string (e.g., “2024-02-21T23:45:15.228Z”). Liquid: {{ event.datetime }}
event.app_id
UUID
The OneSignal App ID. Liquid: {{ event.app_id }}
event.subscription_device_type
string
The subscription type (e.g. iOS, Android, Chrome, Email, SMS). Liquid: {{ event.subscription_device_type }}
event.subscription_id
UUID
The OneSignal Subscription ID. Liquid: {{ event.subscription_id }}
event.onesignal_id
UUID
The OneSignal User ID. Liquid: {{ event.onesignal_id }}
event.external_id
string
Your user ID set as the OneSignal External ID alias. Can be empty if not set. Liquid: {{ event.external_id }}

Channel-specific fields

These event.data.* fields are only present for certain event kinds.

In-app message events

Included with message.iam.* events. See In-app message Event Streams for details.
event.data.page_name
string
The name of the in-app message page or card displayed. Liquid: {{ event.data.page_name }}
event.data.page_id
string
Unique identifier for the in-app message page or card displayed. Liquid: {{ event.data.page_id }}
event.data.target_name
string
The name of the button or image block element clicked. The element must contain an in-app click action. Liquid: {{ event.data.target_name }}
event.data.target_id
string
Unique identifier for the button or image block element clicked. Liquid: {{ event.data.target_id }}

Live Activity events

Included with message.live_activity.* events.
event.data.live_activity_id
string
Unique identifier for a specific Live Activity (e.g., “Knicks vs Cavs - Oct 22 7PM”). Liquid: {{ event.data.live_activity_id }}
event.data.live_activity_type
string
Grouping label for Live Activity categories (e.g., “Knicks_games”). Liquid: {{ event.data.live_activity_type }}

Failed events

Included with message.push.failed and message.email.failed events.
event.data.failure_reason
string
The reason the message failed to send. See Push Message Reports or Email Message Reports for common reasons. Liquid: {{ event.data.failure_reason }}

Event kind reference

For detailed definitions of each metric, see the Metrics Glossary.
Message Event Kind (OneSignal)Event name (in data set)Event Description
Push Sentmessage.push.sentPush notification successfully sent to the push services (FCM, APNS, etc).
Push Receivedmessage.push.receivedPush notification received by recipient. Not available on all platforms. See Confirmed Delivery for more details.
Push Clickedmessage.push.clickedUser tapped the push notification to open the app on device.
Push Failedmessage.push.failedPush failed to be sent. See Push Message Reports for details.
Push Unsubscribedmessage.push.unsubscribedUser unsubscribed on push subscription. See When do push subscription statuses update?.
In-App Impressionmessage.iam.impressionIn-App Message successfully displayed on device.
In-App Clickedmessage.iam.clickedUser tapped an element on the In-App Message.
In-App Page Displayedmessage.iam.page_displayedIn-App Message page was displayed. Helpful for tracking carousels.
Email Sentmessage.email.sentEmail successfully sent.
Email Receivedmessage.email.receivedEmail received by recipient.
Email Openedmessage.email.openedEmail was opened by recipient. See Email Message Reports for details.
Email Link Clickedmessage.email.clickedUser tapped a link in the email.
Email Unsubscribedmessage.email.unsubscribedUser unsubscribed from email via the unsubscribe link.
Email Reported As Spammessage.email.reported_as_spamUser reported the email as spam. Gmail requires Google Postmaster Tools to track. See Email deliverability for more details.
Email Bouncedmessage.email.bouncedEmail returned to sender due to permanent error. See Email Message Reports for details.
Email Failedmessage.email.failedEmail could not be delivered. See Email Message Reports for details.
Email Suppressedmessage.email.suppressedEmail could not be sent because the email address is on the Suppression list.
SMS Sentmessage.sms.sentSMS sent to recipient.
SMS Failedmessage.sms.failedSMS failed to send. See SMS Message Reports for details.
SMS Deliveredmessage.sms.deliveredSMS successfully delivered.
SMS Undeliveredmessage.sms.undeliveredSMS could not be sent. See SMS Message Reports for details.
Live Activity Sentmessage.live_activity.sentLive Activity successfully sent to FCM/APNS.
Live Activity Deliveredmessage.live_activity.deliveredLive Activity received by recipient.
Live Activity Unsubscribedmessage.live_activity.unsubscribedUser unsubscribed from Live Activities.
Live Activity Failedmessage.live_activity.failedLive Activity failed to send.
Live Activity Clickedmessage.live_activity.clickedLive Activity clicked by user.

Example event object

Copy this Liquid template into your Event Stream body to capture all event fields:
JSON
{
  "event.kind": "{{ event.kind }}",
  "event.id": "{{ event.id }}",
  "event.timestamp": "{{ event.timestamp }}",
  "event.datetime": "{{ event.datetime }}",
  "event.app_id": "{{ event.app_id }}",
  "event.subscription_device_type": "{{ event.subscription_device_type }}",
  "event.subscription_id": "{{ event.subscription_id }}",
  "event.onesignal_id": "{{ event.onesignal_id }}",
  "event.external_id": "{{ event.external_id }}",
  "event.data.page_name": "{{ event.data.page_name }}",
  "event.data.page_id": "{{ event.data.page_id }}",
  "event.data.target_name": "{{ event.data.target_name }}",
  "event.data.target_id": "{{ event.data.target_id }}",
  "event.data.failure_reason": "{{ event.data.failure_reason }}"
}
What a push click event looks like after Liquid rendering:
JSON
{
  "event.kind": "message.push.clicked",
  "event.id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "event.timestamp": 1708559115,
  "event.datetime": "2024-02-21T23:45:15.228Z",
  "event.app_id": "your-onesignal-app-id",
  "event.subscription_device_type": "iOS",
  "event.subscription_id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
  "event.onesignal_id": "c3d4e5f6-a7b8-9012-cdef-123456789012",
  "event.external_id": "user_12345",
  "event.data.page_name": "",
  "event.data.page_id": "",
  "event.data.target_name": "",
  "event.data.target_id": "",
  "event.data.failure_reason": ""
}
Channel-specific fields like event.data.page_name are empty for event kinds that don’t include them.

message properties

The message object describes the message sent to the end-user, including its ID, template, content, and URLs.
message.id
UUID
The message ID generated by OneSignal. Liquid: {{ message.id }}
message.name
string
The name of the message as set in the dashboard or using the API name property. Liquid: {{ message.name }}
message.title
object
The push message title or email subject. For push, returns a localized object like {'en':'Your title'}. For email, returns the subject line as a plain string. Set via the dashboard or the API headings / email_subject properties. Liquid: {{ message.title }}
message.contents
object
The push or SMS message content (clipped at 50 characters). Email contents (email_body) are not provided. Set via the dashboard or the API contents property. Liquid: {{ message.contents }}
message.template_id
UUID
The template ID for a message sent via Journeys or the API template_id property. Liquid: {{ message.template_id }}
message.url
string
The message’s launch URL when using a single URL that is web and app agnostic. See URLs, Links and Deep Links. Liquid: {{ message.url }}
message.app_url
string
The app-specific launch URL when using separate web and app URLs. See URLs, Links and Deep Links. Liquid: {{ message.app_url }}
message.web_url
string
The web-specific launch URL when using separate web and app URLs. See URLs, Links and Deep Links. Liquid: {{ message.web_url }}
message.live_activity_event_kind
string
The Live Activity action type: start, update, or end. Only present for message.live_activity.* events. Liquid: {{ message.live_activity_event_kind }}

Example message object

Copy this Liquid template into your Event Stream body to capture all message fields:
JSON
{
  "message.id": "{{ message.id }}",
  "message.name": "{{ message.name }}",
  "message.title": "{{ message.title }}",
  "message.contents": "{{ message.contents }}",
  "message.template_id": "{{ message.template_id }}",
  "message.url": "{{ message.url }}",
  "message.app_url": "{{ message.app_url }}",
  "message.web_url": "{{ message.web_url }}"
}
A push notification message:
JSON
{
  "message.id": "f3c9cd09-10d7-4f59-b9bc-66e16607f1d5",
  "message.name": "weekly-promo-push",
  "message.title": "{'en':'Flash Sale: 50% Off Today'}",
  "message.contents": "{'en':'Shop now and save on select items'}",
  "message.template_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "message.url": "https://example.com/sale",
  "message.app_url": "",
  "message.web_url": ""
}
An email message — message.title is the subject line as a plain string, and message.contents is empty because email body content is not included in Event Stream data:
JSON
{
  "message.id": "e2d3c4b5-a6f7-8901-bcde-f12345678901",
  "message.name": "onboarding-welcome-email",
  "message.title": "Welcome to Acme — here's how to get started",
  "message.contents": "",
  "message.template_id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
  "message.url": "",
  "message.app_url": "",
  "message.web_url": ""
}

user properties

The user object contains profile-level data for the user who received the message.
user.onesignal_id
string
The user’s OneSignal ID. Liquid: {{ user.onesignal_id }}
user.external_id
string
The user’s External ID. Liquid: {{ user.external_id }}
user.tags
object
The user’s tags. Access the full object with {{ user.tags }} or a specific tag with {{ user.tags.your_tag }}. Use a default to handle missing tags: {{ user.tags.your_tag | default: '' }}.
user.language
string
The user’s language code. Liquid: {{ user.language }}

subscription properties

These properties describe the subscription that received the message.
user.subscription.id
string
The subscription’s OneSignal ID. Liquid: {{ user.subscription.id }}
user.subscription.app_id
string
The OneSignal App ID. Liquid: {{ user.subscription.app_id }}
user.subscription.subscription_token
string
The subscription’s platform-specific token. For Email, this is the email address. For SMS, a phone number in E.164 format. For Push, the push token. Liquid: {{ user.subscription.subscription_token }}
user.subscription.session_count
number
Total sessions recorded for this subscription. Liquid: {{ user.subscription.session_count }}
user.subscription.language
string
The language code set on the subscription. Liquid: {{ user.subscription.language }}
user.subscription.game_version
string
The app or game version reported by the subscription. Liquid: {{ user.subscription.game_version }}
user.subscription.last_active
number
UNIX timestamp of the subscription’s most recent session. Liquid: {{ user.subscription.last_active }}
user.subscription.play_time
number
Total play time recorded for this subscription, in seconds. Liquid: {{ user.subscription.play_time }}
user.subscription.amount_spent
number
Total in-app purchase amount recorded for this subscription. Liquid: {{ user.subscription.amount_spent }}
user.subscription.created_at
number
UNIX timestamp of when the subscription was created. Liquid: {{ user.subscription.created_at }}
user.subscription.subscribed
boolean
Whether the subscription is currently opted in. Liquid: {{ user.subscription.subscribed }}
user.subscription.sdk
string
The OneSignal SDK version on the subscription’s device. Liquid: {{ user.subscription.sdk }}
user.subscription.device_model
string
The device hardware model (e.g., “iPhone14,2”, “Pixel 7”). Liquid: {{ user.subscription.device_model }}
user.subscription.device_os
string
The device operating system and version (e.g., “iOS 17.2”, “Android 14”). Liquid: {{ user.subscription.device_os }}


FAQ

Why is some event data missing or blank?

Message data for Journeys and API sends is retained for 30 days. If a user interacts with a message (click, open, unsubscribe) more than 30 days after it was sent, the associated message properties may be blank. To work around this, correlate the message.id from the interaction event with the original sent event, which contains the full message data.

What is the difference between event.id and message.id?

event.id is a unique identifier for the individual event (e.g., one specific click). message.id is the identifier for the message that was sent — multiple events can share the same message.id (for example, a sent event and a clicked event for the same push notification).

What format is message.title for push vs email?

For push notifications, message.title returns a localized object like {'en':'Your title'}. For email, it returns the subject line as a plain string. The format depends on the channel.

Are Custom Events included in Event Streams?

No. Event Streams contain message events (sent, clicked, opened, bounced, etc.) — not Custom Events. Custom Events are user actions you send into OneSignal. Event Streams export message delivery and engagement data out of OneSignal.

How do I reference a specific tag in my Event Stream body?

Use {{ user.tags.your_tag_key }} with the exact tag key. To avoid errors when a tag is not set, add a default: {{ user.tags.your_tag_key | default: '' }}. See Using Liquid syntax for more details.