Custom variables + id/value mapping


I have a quick question which I’ve not been able to find an answer for in the docs / forums. I was wondering if it was possible, when using custom variables, to perform a “mapping” between the value of the custom variable and its “display value”. The use-case is that we want to be able to record a category ID in Piwik, but when it is displayed to the user we want to display the current name of the category so that:

• Category name changes are reflected when viewing stats in Piwik
• If the name is changed the stats for a particular category are kept together

Is something like this possible already? If not, is it something we could easily add in using a plugin or by patching the Piwik source?