Unless it has changes notes can' be tagged. That's à limitation.
how to do it through text variables?
Tags or better xmlElements in teh context of InDesign (as indesign "tags" are generic objects) have texts properties that you can target to apply conditional text.
Have a look at the InDesign Scripting guide. A lot of samples there.