Customer.io: Trigger A Geolocation Followup Drip Campaign
Knowing when a user arrives at a certain location and using that information to get feedback on an event increasingly important factor in keeping in contact with your users without face to face interaction.
That’s because context is everything when interacting with your users. An incredible 93% of said that they are more likely to open correspondence from an event they actually attended.
To get your drip campaign up and running the trick is first know who was actually physically at your event, what they saw, and how long they were there.
Traditionally, knowing who was at your event vs who purchased a ticket but didn’t go was a total shot in the dark.
Thankfully there’s a way to know who was actually at your event, and send follow up emails automatically.
With SpotSense geofencing, Segment, and Customer.io flows, you can now define when a user visited a certain location (i.e. Coachella), how long they were there, route the data using Segment, and create a drip email campaign with Customer.io.
Simply create a geofence on SpotSense, and turn on your Segment integration. Every time a user enters the geofence, that event is sent to Segment as LOCATION-EVENT-ENTER with the coordinates as properties.
Let’s run through it step by step.
Step 1: Identify users who visited your geofence
This recipe assumes you have SpotSense installed, and that you’re tracking location enter and exit events for a certain location. If not, see SDK Installation guide here.
Let’s say you wanted to track when your users visit the Coachella Music Festival.
First, we’ll create a geofence in the SpotSense dashboard:
Log into SpotSense
Navigate to
Locations
>Geofences
.Click “
New geofence
“ and type inCoachella Music Festival
.Manually track the enter event in xCode (This allows you to send user traits and is required for sending follow up emails). Just paste the following code into your view controller
SWIFT
func locationManager(_ manager: CLLocationManager, didEnterRegion region: CLRegion) { //Will Notify Enter event to dashboard for specific region spotsense.handleRegionState(region: region, state: .inside) SEGAnalytics.shared()?.track("Location Event - Enter", properties: [ "geofenceID": ("\\(region.identifier)") ]) } func locationManager(_ manager: CLLocationManager, didExitRegion region: CLRegion) { //Will Notify Exit event to dashboard for specific region spotsense.handleRegionState(region: region, state: .outside) SEGAnalytics.shared()?.track("Location Event - Exit", properties: [ "geofenceID": ("\\(region.identifier)") ]) }
JAVA
JUST TURN ON THE ‘SEGMENT’ OPTION ON THE GEOFENCE PAGE
Click “Create Geofence”
Step 2: Use Segment to route visit data
This assumes you already have Segment Analytics set up for your mobile app. If not, check out their documentation here
- On the
Connections
page, clickAdd destination
- Find and add
Customer.io
- Follow instructions to add the destination
- Click
Preview
and follow the steps toReview & Create
.
You’ve connected Customer.io!
Our next step is to set up pass SpotSense events to Customer.io That’s where we’ll send our drip campaign from.
Step 3: Set up your visitor audience in Customer.io
This assumes you already have Customer.io set up for your mobile app. If not, create your account here
Click on the
Campaigns
tab, clickCreate campaign
Name your campaign i.e.
Location follow up
Click on
An event is performed
Under
Trigger Event
chooseLocation Event - Exit
Click add event data filter and choose
geofenceID
forevent_attribute_name
with the value of your geofence ID hash (Found at the page where we created the geofence in SpotSense as the last hash in the URL)Click save > next
Add an email as your first block in the Customer.io flow > design your email
Create any follow up events i.e. emails based on other conditions, sms text messages, push notifications, etc.
Click finish
That’s it! Now every time a user exits the area during a specific time, they will enter in to the drip campaign you have created on Customer.io!
Step 4: Goals of the drip campaign
The contents of your drip needs to accomplish a few things:
- Make your customers feel genuinely valued — that they’re not the recipient of thoughtless spam.
- Be genuine when asking for follow up feedback.
- Incentivize users to take action with your campaign