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

  1. Navigate to Users > Audiences and then click 'Create' in the top right corner.

  2. Give the audience a name and description. Turn on AUDIENCE_JOINED and AUDIENCE_LEFT events if needed. Set the refresh rate to 'Daily'.

  3. 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"
          }
        }
      }
  4. Click save.

Users in a particular UK postcode area

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+"

  1. Navigate to Users > Audiences and then click 'Create' in the top right corner.

  2. Give the audience a name and description. Turn on AUDIENCE_JOINED and AUDIENCE_LEFT events if needed. Set the refresh rate to 'Daily'.

  3. 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"
          }
        }
      }
  4. 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?