OneSignal New Destination

OneSignal (New) quick info

OneSignal (New) is in beta, and accepts Page, Alias, Group, Identify, and Track calls. If you reference it in the Integrations object, call it “OneSignal New", or "OneSignal (New)”.

OneSignal 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 OneSignal Support team.

This document is about a destination which is in beta

This means that the OneSignal New Destination is in active development, and some functionality may change before it becomes generally available.

Getting Started

  1. From the Destinations catalog page in the Segment App, click Add Destination.
  2. Search for OneSignal in the Destinations Catalog, and select the OneSignal destination.
  3. Choose which Source should send data to the OneSignal destination.
  4. Go to the OneSignal dashboard, select the App and go to the Settings > Keys & IDs. Copy the App ID and the API key.
  5. Enter the OneSignal App ID and the API key in the OneSignal destination settings in Segment and Enable the destination.
  6. Make sure you have an External User ID set for your users on OneSignal. OneSignal uses the External User ID to match with the User ID value from Segment.

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

Supported methods

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

Identify

Send Identify calls to OneSignal. For example:

analytics.identify('userId123', {
  firstName: 'John',
  lastName: 'Doe',
     country: USA
});

These user traits appear as player data tags in OneSignal.

OneSignal does not accept nested objects or arrays as user properties.

Track

Send Track calls to OneSignal. For example:

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

For events and associated properties sent using a Track call, OneSignal drops the event name (for example, Add to Cart), but stores all the properties (for example, productname and brand) as data tags.

Personas

You can send computed traits and audiences generated using Segment Personas to OneSignal. To learn more about Personas, contact Segment for a demo.

Audiences

Persona Audiences appear as a segment in OneSignal.

Audiences sent as part of a Track call create a OneSignal segment with the Audience Name.

Audiences sent as part of an Identify call:

  • Create a OneSignal segment with the Audience Name
  • add data tags (if there are additional properties in the Identify call) on all the matching user records.

The Identify and Track calls are sent to OneSignal whenever a user enters or exits the Audience.

Computed Traits

Personas Computed Traits are stored as Data Tags on the OneSignal user (player) records whether passed to OneSignal as an Identify call or a Track call. You can then use these data tags to manually create OneSignal segments and automate your messaging workflows.

OneSignal Destination FAQ

Managing Segment’s Reserved and Custom Traits

  • All Segment user traits are sent to OneSignal as data tags. The number of data tags allowed on OneSignal depends on your OneSignal pricing plan. Tags over the entitled number will be dropped.

  • OneSignal always updates the firstName and the lastName properties for matching users. All other traits are added/updated on a firstcome basis. firstName and lastName tags are stored as first_name and last_name.

  • User properties sent to OneSignal with blank/null values are removed from the OneSignal user record. This is done to make sure you are within your data tag limits.

  • OneSignal doesn’t store email and phone properties as these key identifiers are stored as separate player records in OneSignal. To update user traits for these records 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 sent from Segment are mapped across all your matching records, including email and phone number records.

Settings

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

Setting Description
API Key
(required)
string. You can find your API Key in your OneSignal app settings page
App Id
(required)
string. You App Id

Adding OneSignal (New) to the integrations object

To add OneSignal (New) to the integrations JSON object (for example, to filter data from a specific source), use one of the following valid names for this integration:

  • OneSignal New

  • OneSignal (New)

This page was last modified: 01 Jul 2021



Get started with Segment

Segment is the easiest way to integrate your websites & mobile apps data to over 300 analytics and growth tools.
or
Create free account