How to store metadata is part of my next blog article 🙂
Your draft is quite similar to what I imagined.
Note: because of how the current datamodel works, every time you will send the context, the values will be stored in to the tag_string table. As it is not compressed (for now), it could get pretty big.