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 New Destination


Destination Info
  • Accepts Identify and Track calls.
  • Refer to it as OneSignal New, or OneSignal (New) in the Integrations object
  • 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 the market leader in driving customer engagement with multi-channel messaging across Web and Mobile Push, In-App Messages, SMS, and Email subscribers.

This destination is maintained by OneSignal. For any issues with the destination, contact the OneSignal support team.

(information)

Info

The OneSignal Destination is available to customers on OneSignal Growth, Professional, and Enterprise plans.


Getting started

getting-started page anchor
  1. Log in to the OneSignal dashboard(link takes you to an external page).
  2. Navigate to Segment App > Settings > Analytics > Segment.com and click Activate.
  3. The Segment App opens in a new window. Log in to authenticate the connection from OneSignal.
  4. Select the workspace and source to connect with OneSignal.
(information)

Info

OneSignal maps the userId field to the External User ID(link takes you to an external page) field in OneSignal.


OneSignal supports the following methods, as specified in the Segment Spec.

Identify

identify page anchor

Send Identify calls to update users. For example:

1
analytics.identify('userId123', {
2
firstName: 'John',
3
lastName: 'Doe',
4
country: 'USA'
5
});

Segment sends Identify traits as Player Data Tags(link takes you to an external page) in OneSignal.

(warning)

Warning

OneSignal doesn't accept nested objects or arrays as user properties.

A screenshot of the Users page in OneSignal.
(information)

Data Tag Limits

Your OneSignal plan may cap incoming Data Tags. Once you've reached your Data Tag limit, your user traits won't update in your OneSignal destination.

Send Track calls to update Data Tags. For example:

1
analytics.track('Add to Cart', {
2
product_name: 'Sunglasses',
3
brand: 'Rayban'
4
})

OneSignal stores Track properties as Data Tags but drops the event name. In the example, Add to Cart is dropped.

To keep the event names on OneSignal Data Tags, append the event name to the properties. For example, Add_to_Cart_brand instead of brand.

Screenshot of the OneSignal dashboard showing a notification for an 'eShoppe' campaign.

You can send Computed Traits and Audiences generated using Engage to OneSignal.

Engage audiences appear as a segment(link takes you to an external page) in OneSignal.

Track calls from Audiences create a OneSignal segment(link takes you to an external page) with the audience name.

Identify calls from Audiences create a OneSignal segment(link takes you to an external page) with the audience name and add Data Tags on all the matching user records.

Screenshot of the OneSignal 'eShoppe' dashboard.

Audiences sends Identify and Track calls to OneSignal when a user enters or exits the Audience.

OneSignal stores Track and Identify calls from Engage Computed Traits as Data Tags(link takes you to an external page) for the OneSignal User/Player's records.


How do I manage Segment's Reserved and Custom Traits?

how-do-i-manage-segments-reserved-and-custom-traits page anchor
  • Segment sends user traits to OneSignal as Data Tags. The number of data tags OneSignal allows depends on your OneSignal pricing plan. OneSignal drops the data tags that go over your set number.
  • OneSignal always updates the firstName and the lastName properties for matching users. All other traits are added or updated on a first-come basis. firstName and lastName tags are stored as first_name and last_name.
  • Send User properties to OneSignal with blank or null values to remove the corresponding Data Tag from the OneSignal user record.
  • OneSignal doesn't store email and phone properties. To update email and phone properties in OneSignal, create a player record with the email address and/or a phone number and map those records with the External_User_ID. Additional properties from Segment map across all your matching records, including email and phone number records.

Segment lets you change these destination settings from the Segment app without having to touch any code.

Property nameTypeRequiredDescription
API Keystring
required

You can find your API Key in your OneSignal app settings page


App Idstring
required

You App Id