Adding 'tag' event hook logic.