Create a user location audience
Last updated
Was this helpful?
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.
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.
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.
The criteria is case sensitive. Consider adding upper and lowercase variations to the schema to ensure accuracy. E.g., for the NE postcode the pattern would be "^(NE|Ne|nE|ne)\\d+"
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
Click save.
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?
Was this helpful?
{
"$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"
}
}
}