Title: Data tags value
Last modified: January 18, 2023

---

# Data tags value

 *  Resolved [huongcba](https://wordpress.org/support/users/huongcba/)
 * (@huongcba)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/data-tags-value/)
 * Hi, Can I add multiple values ​​to a data tag? For example, my users have different
   roles: role 1, role 2, role 3. And I want to send notification to users who have
   at least one matching role.
 * Thank you!

Viewing 1 replies (of 1 total)

 *  Plugin Author [OneSignal Push Notifications](https://wordpress.org/support/users/onesignal/)
 * (@onesignal)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/data-tags-value/#post-16391173)
 * Hello
 * We do not recommend adding array data to tags. OneSignal is not currently capable
   of handling this data type in terms of filtering by items within the array.
 * You should limit your tags to simple string and integer values.
 * For instance the values you would set in the array should be the key and the 
   value should be a 1 or true.
 * It would be recommended to set the value to something more meaningful if applicable
   like a timestamp of when the event occurred so you can filter by time elapsed
   since the event or how many times the event occurred; if applicable.
 * So if you wanted to tag a user with “events”: [“a”, “b”, “c”]
 * You would be better off doing the “event” as the key, like: “a”: 1 where the 
   value 1 can be a timestamp or incremented each time it occurs.
 * Details in our Tags Guide: [https://documentation.onesignal.com/docs/add-user-data-tags](https://documentation.onesignal.com/docs/add-user-data-tags)
 * Let us know if you have any additional questions! Feel free to reach out to [support@onesignal.com](https://wordpress.org/support/topic/data-tags-value/support@onesignal.com?output_format=md).
   Thanks!

Viewing 1 replies (of 1 total)

The topic ‘Data tags value’ is closed to new replies.

 * ![](https://ps.w.org/onesignal-free-web-push-notifications/assets/icon.svg?rev
   =3003897)
 * [OneSignal - Web Push Notifications](https://wordpress.org/plugins/onesignal-free-web-push-notifications/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/onesignal-free-web-push-notifications/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/onesignal-free-web-push-notifications/)
 * [Active Topics](https://wordpress.org/support/plugin/onesignal-free-web-push-notifications/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/onesignal-free-web-push-notifications/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/onesignal-free-web-push-notifications/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [OneSignal Push Notifications](https://wordpress.org/support/users/onesignal/)
 * Last activity: [3 years, 4 months ago](https://wordpress.org/support/topic/data-tags-value/#post-16391173)
 * Status: resolved