Skip to contentSkip to navigationSkip to topbar
On this page
Looking for more inspiration?Visit the
(information)
You're in the right place! Segment documentation is now part of Twilio Docs. The content you are used to is still here—just in a new home with a refreshed look.

OneSignal Source


Source Info
  • The OneSignal Source is an Event Cloud source. This means that it sends data as events, which are behaviors or occurrences tied to a user and a point in time. Data from these sources can be loaded into your Segment warehouses, and also sent to Segment streaming destinations. Learn more about cloud sources.
  • This source is in Beta
  • This integration is partner owned. Please reach out to the partner's support for any issues.

OneSignal(link takes you to an external page) is designed to help you send notifications and seamlessly manage your user communication across every channel, including mobile push notifications, web push notifications, in-app messaging, bulk SMS, and email. The OneSignal platform is quick to set up and makes it easy to customize and automate your messaging strategy without doing any development work.

OneSignal maintains this source. For any issues with the source, contact the OneSignal Support team


Getting started

getting-started page anchor
  1. From your workspace's Sources catalog page(link takes you to an external page), search for OneSignal and then click on the OneSignal Source Tile.
  2. On the OneSignal Source Catalog page, click Add Source.
  3. Give the source a name, for example OneSignal_Prod. The name is used in the Segment interface. Click Add source to save your settings.
  4. Copy the write key from your Segment workspace.
  5. Log in to the OneSignal Dashboard.
  6. Navigate to enable the integration: Settings > Integrations > Segment.com and click Activate.
  7. Scroll down to the Data Out panel and enter your write key from your Segment workspace.
  8. Select the OneSignal Events you want to export, then click Save.
(information)

Info

Exercise caution when sending Email Sent, SMS Sent, Push Sent and In App Message Displayed events to Segment, as these events can contribute significantly to your Segment MTU usage volume.

You are now all set to sync events from OneSignal to your Segment workspace.


OneSignal uses Segment's stream source component to send events to Segment. These events are then available in any destination that accepts server-side events, including your data warehouse.

By default, OneSignal passes the user-level identifiers OneSignal ID (set by OneSignal) and External ID (set by customers), as well as the subscription-level identifier Subscription ID (set by OneSignal) with each event.

Events with no External ID present are anonymous events.


The events OneSignal sends to Segment are identifiers with either userId or anonymousId.

OneSignal sets the Segment userId equal to the OneSignal External ID. If there is no OneSignal External ID for the user, OneSignal sets the Segment anonymousId equal to the OneSignal Subscription ID.

OneSignal doesn't send user email address or phone number details to Segment.


The following table lists the events that OneSignal sends to Segment. These events appear as tables in your warehouse and as regular events in other destinations.

MessageEvent KindEvent Description
Push SentPush notification successfully sent
Push ReceivedPush notification successfully received
Push ClickedPush notification touched on device
In-App Message ImpressionIn-App Message successfully displayed on device
In-App Message ClickedIn-App Message clicked on device
In-App Message Page DisplayedIn-App Message page is displayed
Email SentEmail successfully sent
Email ReceivedEmail received by recipient
Email OpenedEmail opened by recipient
Email Link ClickedEmail contained link, link clicked
Email UnsubscribedEmail unsubscribed by recipient
Email Reported As SpamEmail reported as spam by recipient
Email BouncedEmail returned to sender due to permanent error
Email FailedCould not deliver the email to the recipient's inbox
Email SuppressedEmail is suppressed for a subscription
SMS SentSMS sent to recipient
SMS FailedSMS failed to send
SMS DeliveredSMS successfully delivered
SMS UndeliveredSMS undelivered for a subscription

The following table lists the properties included in the events from the Events table.

Property NameDescription
userIdThe external_id associated with the message
anonymousId The subscription_id associated with the message (only sent if there is no external_id)
messageIdThe identifier of the discrete message
campaign_idThe identifier of the message campaign
message_nameThe message name
message_titleThe message title only for push and email
message_contentsThe message contents only for push and sms
template_idThe message template used
subscription_idThe OneSignal set device/email/sms identifier
subscription_device_typeThe device type that received the message
languageThe two character language code of the device
message_typeThe type of message sent (push, in-app, email, or SMS)

Now that your source is set up, you can connect it with Destinations.

Log in to your downstream tools and check to see that your events appear as expected. Ensure the events contain all of the properties you expect. If your events and properties don't appear, check the Event Delivery tool, and refer to the Destination docs for each tool for troubleshooting.

If there are any issues with how the events are arriving to Segment, contact the OneSignal Support team.