A tag is a snippet of JavaScript that collects data and sends information to a third party such as Google. An example of a tag is the Google Analytics tracking code.