An ad tag is a snippet of code on the publisher’s website that sends a request to the ad server. This request includes information about the placement of the ad, its format (video, popup, image), size, etc. The code also contains information about the user who is about to visit the website.
Based on the ad tag, the ad server searches relevant advertisers that fit into the publisher’s requirements. It also helps advertisers to show their ads to the relevant users.
Ad tags can be automatically generated by the ad network. A publisher has to specify placements, formats, size, topics, keywords, and other requirements with human language. An ad server will offer different types of tags (depends on the ad server). After that, a publisher has to press “Generate tag” and they will receive a code that is readable for machines.
There are two main ad tags types that publishers have to know: synchronous and asynchronous. Asynchronous ad tags load independently from other page elements while synchronous load together with them. Synchronous ad tags slow down the website significantly because if an ad server can not find an advertiser and has no ad to offer, a synchronous ad tag will be sent again and again until there is an ad. While this process is happening, the rest of your page will wait for the ad to load and will not display other content.