Skip to content

Commit f59a6ea

Browse files
committed
merge master
2 parents 7156e88 + af73324 commit f59a6ea

File tree

13 files changed

+258
-35
lines changed

13 files changed

+258
-35
lines changed

scripts/catalog_papi.js

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -386,6 +386,18 @@ const updateDestinations = async () => {
386386
return 0;
387387
})
388388

389+
const clone = (obj) => Object.assign({}, obj)
390+
const renameKey = (object, key, newKey) => {
391+
const clonedObj = clone(object);
392+
const targetKey = clonedObj[key];
393+
delete clonedObj[key];
394+
395+
clonedObj[newKey] = targetKey;
396+
return clonedObj;
397+
};
398+
399+
destination.supportedMethods = renameKey(destination.supportedMethods, 'pageview', 'page')
400+
389401
let updatedDestination = {
390402
display_name: destination.name,
391403
name: destination.name,
@@ -502,5 +514,5 @@ const updateWarehouses = async () => {
502514
}
503515

504516
updateDestinations()
505-
updateSources()
506-
updateWarehouses()
517+
//updateSources()
518+
//updateWarehouses()

src/_data/catalog/destination_categories.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
# AUTOGENERATED FROM PUBLIC API. DO NOT EDIT
2-
# destination categories last updated 2021-06-30
1+
# AUTOGENERATED FROM PLATFORM API. DO NOT EDIT
2+
# destination categories last updated 2021-07-01
3+
34
items:
45
- display_name: A/B Testing
56
slug: a-b-testing

src/_data/catalog/destinations.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# AUTOGENERATED FROM PUBLIC API. DO NOT EDIT
1+
# AUTOGENERATED FROM PLATFORM API. DO NOT EDIT
22
# destination data last updated 2021-07-01
33
items:
44
- display_name: ActiveCampaign

src/_data/catalog/source_categories.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
1+
<<<<<<< HEAD
12
# AUTOGENERATED FROM PUBLIC API. DO NOT EDIT
23
# source cateogries last updated 2021-06-30
4+
=======
5+
# AUTOGENERATED FROM PLATFORM API. DO NOT EDIT
6+
# source cateogries last updated 2021-07-01
7+
>>>>>>> master
38
items:
49
- display_name: A/B Testing
510
slug: a-b-testing

src/_data/catalog/sources.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1+
<<<<<<< HEAD
12
# AUTOGENERATED FROM PUBLIC API. DO NOT EDIT
3+
=======
4+
# AUTOGENERATED FROM PLATFORM API. DO NOT EDIT
5+
>>>>>>> master
26
# sources last updated 2021-07-01
37
items:
48
- display_name: .NET
109 KB
Loading
108 KB
Loading
573 KB
Loading
Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
---
2+
rewrite: true
3+
title: OneSignal New Destination
4+
hide-personas-partial: true
5+
---
6+
7+
[OneSignal](https://onesignal.com/?utm_source=segmentio&utm_medium=docs&utm_campaign=partners) is the market leader in driving customer engagement with multi-channel messaging across Web and Mobile Push, In-App Messages, SMS, and Email subscribers.
8+
This destination is maintained by OneSignal. For any issues with the destination, [contact OneSignal Support team](mailto:[email protected]).
9+
10+
{% include content/beta-note.md %}
11+
12+
## Getting Started
13+
14+
{% include content/connection-modes.md %}
15+
16+
1. From the Destinations catalog page in the Segment App, click **Add Destination**.
17+
1. Search for OneSignal in the Destinations Catalog, and select the OneSignal destination.
18+
1. Choose which Source should send data to the OneSignal destination.
19+
1. Go to the [OneSignal dashboard](https://app.onesignal.com/apps/){:target="_blank"}, select the App and go to the *Settings > Keys & IDs*. Copy the **App ID** and the **API key**.
20+
1. Enter the OneSignal **App ID** and the **API key** in the OneSignal destination settings in Segment and Enable the destination.
21+
1. Make sure you have an **[External User ID](https://documentation.onesignal.com/docs/onboarding-with-onesignal#step-3-connect-user-data-to-onesignal)** set for your users on OneSignal. OneSignal uses the **External User ID** to match with the **User ID** value from Segment.
22+
23+
> info ""
24+
> The OneSignal Destination is available customers on OneSignal Professional and Enterprise plans.
25+
26+
## Supported methods
27+
28+
OneSignal supports the following methods, as specified in the [Segment Spec](/docs/connections/spec).
29+
30+
### Identify
31+
32+
Send [Identify](/docs/connections/spec/identify) calls to OneSignal. For example:
33+
34+
```js
35+
analytics.identify('userId123', {
36+
firstName: 'John',
37+
lastName: 'Doe',
38+
country:USA
39+
});
40+
```
41+
42+
These user traits appear as player [data tags](https://documentation.onesignal.com/docs/add-user-data-tags) in OneSignal.
43+
44+
> warning ""
45+
> OneSignal does not accept nested objects or arrays as user properties.
46+
47+
![](images/demo.png)
48+
49+
50+
51+
### Track
52+
53+
Send [Track](/docs/connections/spec/track) calls to OneSignal. For example:
54+
55+
```js
56+
analytics.track('Add to Cart', {
57+
product_name: 'Sunglasses',
58+
brand: 'Rayban'
59+
})
60+
```
61+
62+
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.
63+
64+
![](images/track-example.png)
65+
66+
67+
68+
69+
## Personas
70+
71+
You can send computed traits and audiences generated using [Segment Personas](/docs/personas) to OneSignal. To learn more about Personas, contact Segment for a [demo](https://segment.com/contact/demo){:target="_blank"}.
72+
73+
### Audiences
74+
75+
Persona Audiences appear as a [segment](https://documentation.onesignal.com/docs/segmentation) in OneSignal.
76+
77+
Audiences sent as part of a Track call create a OneSignal [segment](https://documentation.onesignal.com/docs/segmentation) with the Audience Name.
78+
79+
Audiences sent as part of an Identify call:
80+
81+
- Create a OneSignal segment with the Audience Name
82+
- add data tags (if there are additional properties in the Identify call) on all the matching user records.
83+
84+
![](images/audiences.jpg)
85+
86+
The Identify and Track calls are sent to OneSignal whenever a user enters or exits the Audience.
87+
88+
### Computed Traits
89+
90+
Personas Computed Traits are stored as [Data Tags](https://documentation.onesignal.com/docs/add-user-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.
91+
92+
# OneSignal Destination FAQ
93+
94+
**Managing Segment’s Reserved and Custom Traits**
95+
96+
* 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.
97+
98+
* 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`.
99+
100+
* 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.
101+
102+
* 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
103+
* Create a player record with the email address and/or a phone number and map those records with the External_User_ID.
104+
* Additional properties sent from Segment are mapped across all your matching records, including email and phone number records.

src/connections/destinations/catalog/onesignal/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
title: OneSignal Destination
3+
hidden: true
34
---
45

56
## Getting Started

0 commit comments

Comments
 (0)