Airship integration

Connect Woosmap Geofencing SDK with Airship

  1. Airship Integration
  2. Send Airship Custom events

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

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

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
distance String X
country_code String X
address String X
tags String X
types String X
user_properties.[field_name] String X

POI Events

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
Was this article helpful?
Have more questions? Submit a request