Just a heads up that improvements to tagging are currently being worked on and will be submitted for consideration for inclusion in core soon.
Moodle 3.1 has greatly enhanced tagging functionality over previous versions - but, with one exception, tags currently only apply at an Activity/Resource level.
Some activities in Moodle allow content to be created 'within' the activity - forum posts, wiki pages, glossary entries, database entries, book chapters, etc. - but apart from wiki pages, it is currently not possible to tag the individual entry level.
The improvements being developed allow forum posts, book chapters, glossary entries and database entries to be tagged independently to their 'parent' activity.
Anyone interested can see the WIP version of this code at https://github.com/andrewhancox/moodle/tree/tagging. It's currently feature complete and undergoing testing.
To be clear this is not fully tested code and there are known issues so please do not test this on a site you care about. There are a couple of known bugs that have already been discovered which will get fixed in the next few days.