OneSignal has support for custom tags, to categorize and segment your users. Tags are name-value pairs of strings. More info at

You may get and set these tags programmatically using javascript, or alternatively expose a native UI where users can toggle pre-specified tags on/off. 


Javascript method

Get tags

window.location.href = 'gonative://onesignal/tags/get?callback=functionName';

//functionName will get called with an object like:
success: true,
tags: {
tag1: "value1"
//If there is an error retrieving tags, success will be false.

Set tags

var tags = {
name1: 'value1',
name2: 'value2'

window.location.href = 'gonative://onesignal/tags/set?tags=' + encodeURIComponent(JSON.stringify(tags));

//You may set value to an empty string to delete an existing tag.


Native UI Method

Edit the Import/Export section of your app's configuration as follows. Your tags can be specified in JSON format, with example at

"oneSignal": {
"active": true,
"applicationId": "XXXXX",
"tagsJsonUrl": ""

Then call the following function on your page


The native UI will be displayed as follows: