Airship integration
Connect Woosmap Geofencing SDK with Airship
Woosmap Geofencing SDK can send events to Airship from different context types: Geofences, POI, Visits and ZOI.
Whenever location events trigger, you can send custom events with associated properties to your App via a listener method. Your App can then pass them to the Airship SDK and use the Custom Event trigger in the Automation and Journey composers.
Airship Integration
Requirements
- SDK version 6.0 or later: Download the latest stable SDK from appropriate platform page.
- Account Entitlements: Account-level permissions apply, based on your pricing package. Contact Airship Sales with any questions related to pricing and entitlements for location and automation services.
Configuration
To configure your app with the Airship SDK follow the instructions on the dedicated Getting Started guide on https://docs.airship.com/platform/.
Send Airship Custom events
Custom events let you track user activities and key conversions in your mobile app, and tie them back to corresponding push messaging campaigns. For a more detailed explanation on custom events and possible use cases, see the Airship Custom Events topic guide.
iOS Example
public class AirshipEvents: AirshipEventsDelegate {
public init() {}
public func regionEnterEvent(regionEvent: Dictionary<String, Any>, eventName: String) {
#if canImport(AirshipCore)
let event = UACustomEvent(name: eventName, value: 1)
event.properties = regionEvent
event.track()
#endif
}
Android Example
public class WoosRegionLogReadyListener implements Woosmap.RegionLogReadyListener {
public void RegionLogReadyCallback(RegionLog regionLog) {
onRegionLogCallback(regionLog);
}
}
private void onRegionLogCallback(RegionLog regionLog) {
if(AIRSHIP) {
// Create and name an event
CustomEvent.Builder eventBuilder = new CustomEvent.Builder(regionLog.didEnter ? "geofence_entered_event" : "geofence_exited_event");
// Set custom event properties on the builder
eventBuilder.addProperty("id",regionLog.id);
eventBuilder.addProperty("radius", regionLog.radius);
eventBuilder.addProperty("latitude", regionLog.lat);
eventBuilder.addProperty("longitude", regionLog.lng);
// Then record it
CustomEvent event = eventBuilder.build();
event.track();
}
}
Geofences Events
- Enter eventName:
woos_geofence_entered_event
- Exit eventName:
woos_geofence_exited_event
Event data specification
Field name | Type | Only if the region is a POI |
---|---|---|
date |
Datetime | |
id |
String | |
latitude |
Double | |
longitude |
Double | |
radius |
Double | |
name |
String | X |
idStore |
String | X |
city |
String | X |
zipCode |
String | X |
country_code |
String | X |
address |
String | X |
tags |
String | X |
types |
String | X |
user_properties.[field_name] |
String | X |
POI Events
- eventName:
woos_POI_event
Event data specification
Field name | Type |
---|---|
date |
Datetime |
name |
String |
idStore |
String |
city |
String |
zipCode |
String |
distance |
String |
country_code |
String |
address |
String |
tags |
String |
types |
String |
user_properties.[field_name] |
String |
Visits Events
- eventName:
woos_Visit_event
Event data specification
Field name | Type |
---|---|
date |
Datetime |
arrivalDate |
String |
departureDate |
String |
id |
String |
latitude |
String |
longitude |
String |
ZOI Events
- Enter eventName:
woos_zoi_classified_entered_event
- Exit eventName:
woos_zoi_classified_exited_event
Event data specification
Field name | Type |
---|---|
date |
Datetime |
id |
String |
latitude |
Double |
longitude |
Double |
radius |
Double |