How to create segments based on your customers’ geolocation with the help of advanced SQL
Customer segmentation may be already a well-known functionality to you. Marketers commonly use segmentation on the basis of demographic data, such as age and gender. A more recent trend is an extensive usage of behavioral data (clicks, opens, website visits), which let your messaging be even more relevant and engaging.
Rush49, a startup which sells events, deals and activities online, can tell you a thing or two about it. The ways in which they use segmentation include the following cases:
- Send a notification email to customers who purchase the last year’s Wine Festival deal alerting them that this year’s Festival is now available
- Send a coupon email to all users who viewed but did not purchase a Car Racing deal within the past 6 months
- Send a promo for a newly added Fun Run X to anyone who purchased a running-related deal in the past year (zombie run, mud run, 5K…)
These are prime examples of efficient business level behavior-based segmentation.
Lance Wawer, Senior Digital Marketing Director at Rush49:
Expertsender saved us from a rapid drop in engagement and inbox placement. From the moment we signed up, they have done everything to ensure that everything goes as smoothly as possible. The platform makes it easy to have true control over our sending IPS checking our content against spam prior to sending, as well as the ability to segment our recipients to the exact audience that we want to serve.
There are, however, even more possibilities which you can leverage to increase relevance and build very narrowly defined segments. One of them is to make use of geolocation.
Geolocation data are typically provided by the ubiquitous GPS satellites, and if a user switches GPS in their phone off, their approximate location can still be determined with the help of cell towers. Afterwards, the information is sent to the phone, which may further use it for serving personalized services: maps, displaying the closest restaurant, police or emergency station… and many others.
The benefits offered by access to a phone user’s location were quickly recognized by marketers. There is no doubt that your customers’ current location can greatly influence their customer behavior. They are on holiday in London? Send them a quick message enticing them to your London store while they are passing by. They are in a place where it’s very hot according to a weather forecast? Invite them for a cold refreshing drink or for ice cream!
Rush49 didn’t want to miss the opportunity and implemented a number of geolocation-based campaigns. Examples include:
- Send a marketing email to anyone within 30 miles of Santa Monica, CA
- Send a marketing email to customers within 75 miles of Chicago who bought a voucher for Chicago Balloon Adventure within the past year
ExpertSender, with its advanced segmentation and Data Table functionalities, allows you to do this and much more! Let us analyze a scenario in which you want to target all customers currently in a 5-mile radius around Canary Wharf, London.
1. Store geolocation data in Data Tables
Our Data Tables, based on the relational database model, let you store any kind of data, including data about geolocation. Location data consist of only two pieces of information: latitude and longitude. In order to store it in a Data Table, you need to do the following:
a) Create a table which will contain at least three columns: user id (or another unique identifier, like email), latitude, and longitude.
b) Schedule an import to the location table which will update the data at selected intervals (for example, every hour).
This way, you always know where your customer is at the moment and can react accordingly!
2. Create an advanced SQL template
It will calculate a radius around a specific point on the basis of its coordinates and will find all users within this radius:
The template makes use of quite advanced SQL features, such as trigonometric functions.
3. Specify the parameters used in the template
Below the template body, specify the three parameters used in the template: latitude, longitude and distance.
We are not inserting any specific data at this point, so we can create as many segments as we want, with various locations and radiuses.
4. Create a dynamic segment
The next step is creating a segment in which you will decide on the desired location and distance. You will use a data table restriction with a comparison to an SQL query with parameters:
Then, add the coordinates of the desired geographical location (for Canary Wharf: 51.5054° N, 0.0235° W) and the desired radius (in our case, 5):
Then, save the segment under a representative name. It will be immediately visible on the segment list:
5. Send relevant messages to your customers!
At this point, you’ve got all you need to micro-target your subscribers in the vicinity of Canary Wharf. Just create a compelling newsletter and go ahead!
That’s it! This way, you make sure that all clients around Canary Wharf know about your store and can visit it today!
Please note that this demonstration does not do justice to the whole power and breadth of the ExpertSender segmentation and Data Tables – we have just scratched the surface! What else can you accomplish? Our system allows you to combine demographic, behavioral and now also geolocation data in any conceivable way and to create the most sophisticated segments you can imagine.
Geolocation data are yet another tool in the arsenal of a skilled marketer. Multiple companies (such as Rush49) have already found a way to implement geolocation-based campaigns. Don’t stay behind and leverage it to drive sales and boost your revenue!