Create a user location audience
Introduction
User location can be a great way of tailoring your loyalty program to a specific user. It can be used to promote local events and rewards, while ensuring that you're only showing relevant information to relevant people.
Configuration
Users in a particular city
Navigate to Users > Audiences and then click 'Create' in the top right corner.
Give the audience a name and description. Turn on AUDIENCE_JOINED and AUDIENCE_LEFT events if needed. Set the refresh rate to 'Daily'.
Move to the criteria tab. The criteria should be;
Profile matches JSON schema
{ "$schema": "http://json-schema.org/draft-06/schema#", "type": "object", "required": [ "city" ], "properties": { "city": { "const": "enter city name here" } } }
Click save.
Users in a particular UK postcode area
The following setup applies to UK postcode formats. Setting up for different countries will require a different schema. The country validation in the schema ensures that countries with similar postcode formats are excluded.
Navigate to Users > Audiences and then click 'Create' in the top right corner.
Give the audience a name and description. Turn on AUDIENCE_JOINED and AUDIENCE_LEFT events if needed. Set the refresh rate to 'Daily'.
Move to the criteria tab. The criteria should be;
Profile matches JSON schema
{ "$schema": "http://json-schema.org/draft-06/schema#", "type": "object", "properties": { "postcode": { "type": "string", "pattern": "^(POSTCODE AREA 1|POSTCODE AREA 2|POSTCODE AREA 3)\\d+" }, "country": { "const": "GB" } } }
Click save.
Tips
The end-user can update their location details via their profile at any time. Consider this if you're using this audience to limit reward availability.
Last updated
Was this helpful?