If you’d like to be able to segment your users based on specific interests or categories when sending push notifications you can use the nativeFunctions.onesignalSendTags() functions to add tags to your users in OneSignal.
If a user enables an option on your website, to receive promotional messages, for example, you could trigger the native function to add the “promotions” tag into his OneSignal profile.
Later on, when sending promotions to your users, you would then be able to target all those users who have the “promotions” tag in their profiles.
Here is an example on how to trigger the native function:
You can find more details on how to use tags in OneSignal, here: https://documentation.onesignal.com/docs/add-user-data-tags