{"_id":"576406c411b88b0e009c0eab","version":{"_id":"56cecbdc44c5700b0095c03d","project":"56cecbdb44c5700b0095c03a","__v":10,"createdAt":"2016-02-25T09:39:40.121Z","releaseDate":"2016-02-25T09:39:40.121Z","categories":["56cecbdc44c5700b0095c03e","56d1d2c05ad7ad0b00b7e809","56d1d2fa5ad7ad0b00b7e80a","56d369331660770b00081159","56d3693d1660770b0008115a","56e5361e7990160e002e3fbc","56e5362775eb791700a9c4d2","57a9030947f2f419009188d4","57b4705ee9e4c60e00f6f4c3","5828f5b04774ab0f005179a2"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"parentDoc":null,"project":"56cecbdb44c5700b0095c03a","category":{"_id":"56d369331660770b00081159","__v":5,"project":"56cecbdb44c5700b0095c03a","pages":["56d403d87e7f160b00cd10a8","56e51bf22d90970e00af1b18","56e527ad75eb791700a9c4c4","56e538732d90970e00af1b28","56e6941a0d2f0f0e009326b0"],"version":"56cecbdc44c5700b0095c03d","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-02-28T21:40:03.218Z","from_sync":false,"order":1,"slug":"android","title":"Android"},"user":"56cecbb2e50c9c1b008303eb","__v":3,"githubsync":"","updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-06-17T14:18:44.365Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":3,"body":"User segmentation enables you to send notifications to a specific audience. For example, if you have a news app, you can let your users specific content categories that interest them. So if one marked \"Sports\" you can tag it with this name, and later send a sport specific notification, just to those users who marked this category.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Adding tags for a device\"\n}\n[/block]\nIn order to add tag for a device, add the following code at the relevant place:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"PushApps.addTag(context, new PATag(\\\"sports_fan\\\", true));\",\n      \"language\": \"java\"\n    }\n  ]\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"title\": \"Tags are case insensitive\",\n  \"body\": \"Please notice that tags should be lowercase only (but can contains numbers, signs or any other characters).\"\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Removing tags for a device\"\n}\n[/block]\nIn order to remove tag for a device, add the following code at the relevant place:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"PushApps.removeTag(context, \\\"sports_fan\\\");\",\n      \"language\": \"java\"\n    }\n  ]\n}\n[/block]","excerpt":"","slug":"user-segmentation","type":"basic","title":"User Segmentation"}
User segmentation enables you to send notifications to a specific audience. For example, if you have a news app, you can let your users specific content categories that interest them. So if one marked "Sports" you can tag it with this name, and later send a sport specific notification, just to those users who marked this category. [block:api-header] { "type": "basic", "title": "Adding tags for a device" } [/block] In order to add tag for a device, add the following code at the relevant place: [block:code] { "codes": [ { "code": "PushApps.addTag(context, new PATag(\"sports_fan\", true));", "language": "java" } ] } [/block] [block:callout] { "type": "warning", "title": "Tags are case insensitive", "body": "Please notice that tags should be lowercase only (but can contains numbers, signs or any other characters)." } [/block] [block:api-header] { "type": "basic", "title": "Removing tags for a device" } [/block] In order to remove tag for a device, add the following code at the relevant place: [block:code] { "codes": [ { "code": "PushApps.removeTag(context, \"sports_fan\");", "language": "java" } ] } [/block]