Question:
We want to send a push only to users located in a specific country. How do we do that?
Answer:
Use the default Country tag. If you plan to send such pushes regularly, save the condition as a segment so you don’t have to rebuild it every time.
Create the segment
- Go to Audience > Segments.
- Click Create Segment and select Build Segment.
- In the segment builder, under Add filter by, choose Tag and pick the Country tag.
- Set the operator to equals and choose the country you want to target.
- Click Save and give the segment a name.
Tip: you can combine the Country tag with Event, Segment, User ID or Geo filters in the same segment. For radius-based targeting use the Geo filter instead.
Use the segment
Control Panel: open the message creation form, prepare your content and select the saved segment as the audience.
API: add the segment (filter) name to your request. New integrations should use Messaging API v2 (POST /messaging/v2/notify) and pass the segment code; /createMessage is deprecated but still works:
"filter": "FILTER_NAME"
Alternatively, pass the condition inline without saving a segment:
"conditions": [["Country", "EQ", "FR"]]
The Country tag value is an uppercase two-letter ISO 3166-1 alpha-2 country code, and matching is case-sensitive — fr will not match anything, use FR. Note that filter and conditions must not be used together, and both are ignored if the devices parameter is present in the same request.
Comments
0 comments
Please sign in to leave a comment.