added onBeforeAddTag callback only for typed tags