Add ability to tag sample before merge.

Tag format is user configurable.