OneSignal
Example JSON Payloads
{
"userId": "{String}",
"context": {
"traits": {},
"localeactions": "en",
"device": {
"advertisingId": "{String}"
}
},
"event": "placeHistorical",
"properties": {
"visitType": "historical",
"probability": "{Double}",
"confidence": "{String}",
"lat": "{Double}",
"lng": "{Double}",
"locationType": "{String}",
"visitId": "{String}",
"timestamp": "{YYYY-MM-DDTHH:MM:SS.XXXZ}",
"venueName": "{String}",
"venueId": "{String}",
"primaryCategoryName": "{String}",
"primaryCategoryId": "{String}",
"primaryChainName": "{String}",
"primaryChainID": "{String}",
"address": "{String}",
"crossStreet": "{String}",
"city": "{String}",
"state": "{String}",
"zipCode": "{String}",
"country": "{String}",
"supervenueId": "{String}",
"supervenueName": "{String}",
"supervenuePrimaryCategoryId": "{String}",
"supervenuePrimaryCategoryName": "{String}",
"supervenuePrimaryChainId": "{String}",
"supervenuePrimaryChainName": "{String}"
},
"type": "track"
}
{
"EventDefinitionKey": "pilgrimArrivalEntrySource",
"ContactKey": "{String}",
"Data": {
"visitType": "departure",
"confidence": "{ConfidenceLevel}",
"lat": "{lat}",
"lng": "{long}",
"locationType": "venue",
"visitId": "{VisitID}",
"timestamp": "{Timestamp}",
"venueName": "{VenueName}",
"venueId": "{VenueID}",
"primaryCategoryName": "{PrimaryCategoryName}",
"primaryCategoryId": "{PrimaryCategoryID}",
"address": "{Address}",
"crossStreet": "{Cross Street}",
"city": "{CityName}",
"state": "{StateCode}",
"zipCode": "{ZipCode}",
"country": "{CountryCode}",
"ContactKey": "{String}",
"userId": "{String}"
}
}
{
"EventDefinitionKey": "pilgrimArrivalEntrySource",
"ContactKey": "{String}",
"Data": {
"visitType": "arrival",
"confidence": "{ConfidenceLevel}",
"lat": "{lat}",
"lng": "{long}",
"locationType": "venue",
"visitId": "{VisitID}",
"timestamp": "{Timestamp}",
"venueName": "{VenueName}",
"venueId": "{VenueID}",
"primaryCategoryName": "{PrimaryCategoryName}",
"primaryCategoryId": "{PrimaryCategoryID}",
"address": "{Address}",
"crossStreet": "{Cross Street}",
"city": "{CityName}",
"state": "{StateCode}",
"zipCode": "{ZipCode}",
"country": "{CountryCode}",
"ContactKey": "{String}",
"userId": "{String}"
}
}
{
"EventDefinitionKey": "pilgrimArrivalEntrySource",
"ContactKey": "{String}",
"Data": {
"geofenceEventType": "exit",
"geofenceLat": "{Double}",
"geofenceLng": "{Double}",
"radius": "{Double}",
"venueId": "{String}",
"categoryIds": "{String}",
"venueChainIds": "{String}",
"partnerVenueId": "{String}",
"eventLat": "{Double}",
"eventLng": "{Double}",
"geofenceId": "{String}",
"geofenceName": "{String}",
"geofenceProperties": {},
"ContactKey": "{String}",
"userId": "{String}"
}
}
{
"userId": "{String}",
"eventName": "geofenceEnter",
"createdAt": 1646691428,
"dataFields": {
"geofenceEventType": "entrance",
"geofenceLat": "{Double}",
"geofenceLng": "{Double}",
"radius": "{Double}",
"venueId": "{String}",
"categoryIds": "{String}",
"venueChainIds": "{String}",
"partnerVenueId": "{String}",
"eventLat": "{Double}",
"eventLng": "{Double}",
"geofenceId": "{String}",
"geofenceName": "{String}"
}
}
{
"userId": "{String}",
"eventName": "geofenceDwell",
"createdAt": 1646691515,
"dataFields": {
"geofenceEventType": "dwell",
"geofenceLat": "{Double}",
"geofenceLng": "{Double}",
"radius": "{Double}",
"venueId": "{String}",
"categoryIds": "{String}",
"venueChainIds": "{String}",
"partnerVenueId": "{String}",
"eventLat": "{Double}",
"eventLng": "{Double}",
"geofenceId": "{String}",
"geofenceName": "{String}"
}
}
Integration Details
Visits & Geofence Data Schemas
To view the schemas for the visits and geofence events data you will be receiving, please see:
- Make sure both OneSignal and the Pilgrim SDK are properly setup.
- In order to properly map your OneSignal users to Foursquare, you will need to:
- Associate your own User Ids to each of their corresponding OneSignal device records via the external_user_id.
- Set the associated OneSignal
external_user_id
s by using thesetUserId method
ofPilgrimUserInfo
in the Pilgrim SDK.
- Enter your OneSignal App ID in to your app's Foursquare Pilgrim Console.
- Once you have configured the Pilgrim Console, the Pilgrim SDK will automatically track location events and forward them to OneSignal, allowing you to retarget and segment your customers.
Updated 10 months ago