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.
Introduction
To navigate to Geolocations, go to Channels > Mobile Engage > Geolocations tab.
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
- Latitude
- Longitude
- 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.
vienna, 48.2082, 16.3738, 350
big_ben, 51.5007, 0.1246, 300
Eiffel_tower, 48.8584, 2.2945, 400
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.
One Geolocation file is limited to 3.000 locations for better performance results.

If 2 geolocation files overlap the same location area and both files trigger the same campaign, the campaign will show up twice on the user's device. The SDK cannot tell in this case, if 2 geolocation files are triggering the same campaign or there are 2 different campaigns.
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
- 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.
Activating the Geofence mobile event in Interactions
- Go to Channels > Mobile Engage > Geolocations tab and upload a list of coordinates. See, Import Geolocation Data.
- Turn on location tracking on the mobile application.
- One of the coordinates needs to be triggered by an app user within the radius.
- Once a coordinate has been triggered, you will see the mobile event type Geofence in the Mobile Event entry node within Interactions.