# Plugin - Get unseen topic count per tag

**URL:** <https://meta.discourse.org/t/plugin-get-unseen-topic-count-per-tag/70937>\
**Category:** Development\
**Created:** [28. September 2017 um 12:39 UTC](https://meta.discourse.org/t/plugin-get-unseen-topic-count-per-tag/70937 "2017-09-28T12:39:51Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![jack2](https://avatars.discourse-cdn.com/v4/letter/j/ac91a4/32.png) [@jack2](https://meta.discourse.org/u/jack2)\
**Post date:** [29. September 2017 um 10:28 UTC](https://meta.discourse.org/t/plugin-get-unseen-topic-count-per-tag/70937/3 "2017-09-29T10:28:26Z")

</div>

Thanks @sam.

I’ve just seen that I can get the unseen topic ids from the `topicTrackingState.state` object (as you mentioned, I can see the category in there, but not the tags). So here is a better plan:

1. Observe the `topicTrackingState.messageCount` property.
2. Each time there’s a change, use the API to load the unseen topics and get their tags

---

_[View the full topic](https://meta.discourse.org/t/plugin-get-unseen-topic-count-per-tag/70937)._
