Airship
How We Work Together
With Foursquare and Airship, you can send notifications to your users in-app based on how they move throughout the world. Airship can help you identify your most loyal customers and keep them coming back for more with personalized messaging, the ability to offer coupons and deals based on their location, and accelerate conversions to provide a great user experience from start to finish.
Examples of What You Can Do
Integrating with Airship enables you to provide some powerful use-cases to help personalize your users' experiences:
Push in-app notifications to your users when they visit a specific venue or enter a geofence, such as an alert for a coupon or deal.
Drive engagement by pushing special deals to your most loyal customers.
Example JSON Payloads
": "{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}"
}
}
{
"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": "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
- Make sure the Movement SDK is properly setup.
- Make sure that you've set a user specific ID by using the
setUserId method
ofUserInfo
in the Movement SDK. - Make sure that you've set an
airshipId
property on theUserInfo
object with the user's Airship Channel ID.
iOS: let channelID = UAirship.channel().identifier
.
Android: String channelId = UAirship.shared().getChannel().getId();
- From your Foursquare Developer Console, Enable Third Party Integrations .
- Fill in your Airship account's
App Key
andAccess Token
in your app's Foursquare Developer Console.
Note: Make sure these are the same Airship credentials you've supplied in your mobile app. For more information on how to create these credentials, see Airships's documentation.
- Select the specific visit and geofence fields you wish to send to Airship.
- Once done in the Airship modal, be sure to save your changes. Once saved, the Movement SDK will automatically track location events and forward them to Airship.
Updated almost 2 years ago