To use Geofences to launch campaigns, it is a requirement to have access to the Interactions feature.
This article provides you information for setting up Geofences to be used in location targeting campaigns for sending to user groups across multiple mobile platforms and devices.
To navigate to Geolocations, go to Channels > Mobile Engage > Geolocations tab.
On this tab you can see details of all your registered geolocations listed with the App Name, Location Name, Radius and the date it was last Changed.
Creating Geolocation File For Import
The format required for the geolocation file to be imported has 4 columns, the columns are:
- Location name
- Radius (in metres)
The file should be saved in CSV format, not have have column headers, and be in the column order set above. Please ensure when saving the CSV file, that comma's are used as the separator and not semicolon's which can sometimes be the default when saving in CSV format. An example file is shown below:
For the radius of the geofence, the recommended minimum in metres (based on platform guidelines) are 100 for Android and 50 for iOS.
It is possible to retrieve the latitude and longitude of a location by using Google Maps. The steps to do this are as follows:
- Open Google Maps web page on a browser.
- Search for the location, e.g. "Emarsys London office"
- Right click the red pointer on the map and select "What's here?"
- The latitude and longitude details will be displayed in a small box at the bottom of the screen.
Import Geolocation Data
Importing a geofence file will overwrite any geolocations previously uploaded for an app. Therefore, it is required to include not only new geofences in the import file, but also the previously uploaded geofences it is desired to retain them.
Click Import Geolocation Data in the Geolocations tab, to open the import form.
Select the application, upload the file that contains the geolocation coordinates and click Upload.
After the geofences are successfully uploaded for the app, whenever the device enters any of the configured geofences, the Emarsys SDK will fire a custom event that can be used in a Interactions program.
Creating an Interactions Program
Before creating an Interactions program, please make sure that the push campaign has already been created to be linked to the program. A guide on how to create push campaigns is available here.
- Navigate to Automation > Automation Programs.
- Click on Create Program at the top right of the screen and select Behavior-focused journeys (Interactions).
- Select Mobile Event as the trigger.
- Double click the Mobile Event node to open the edit options, select geofence and click OK.
- Click on the Mobile Engage push message node option available on the left of the screen.
- Double click the Mobile Engage push message that has been added to edit it.
- Select the push campaign to be used for the program and click OK.
Should it be desired to send this campaign to devices that enter any geofence, the steps above are enough to run a basic program. There is the ability to only send the campaign when a particular geofence attribute is received (e.g. when a particular location named in the geofence CSV file is received) and to configure this option, the steps are outlined below.
- Drag a Decision node over so that it highlights the line between the Mobile Event node and the Mobile Engage push, as shown the image below. Then drop the node in place.
- Double click the Decision node to edit it.
- Enter the details requested:
- Name - Name of the Decision node
- Type - Select Trigger Attributes
- event_attributes - event_attributes.name
- Middle Option [Please Select] - Select Equals under the Text section.
- Attribute_value - Enter the name of the location as defined in the geofence file uploaded.
The name of the location provided in the Attribute_value field needs to be an exact match for what was entered for the location in the geofence CSV file uploaded to the account.
- Click OK
There is a potential to configure greater complexities in the program decision making, e.g. frequency capping. Further guides on the topic can be found in the Interactions documentation.