Ad Codes / Placement Tags. Overview

Updated 2 Oct 2020 02:34:59

Placement tags or Ad codes main task is to load an ad into the placement on a website or in an app. Additionally, ad codes are responsible for cookie management, impression tracking, ad rotation, visibility tracking and other tasks.

Ad code workflow

When a visitor navigates to the page where the code has been inserted, the browser go through the following workflow.

  1. Browser starts loading a page, e.g. http://adpublisher.com/,
  2. Ad code placed on the page loads and connects to AdVow Network server, initiating tracker code, which in turn triggers ad tracker object.
  3. Ad tracker makes a request to the database, querying for an   ad markup to be loaded into the ad slot
  4. AdVow Network server responds with the ad markup code, having processed all targeting or campaign matching logic
  5. Ad code makes a request to the AdVow Network server, confirming the impression.
  6. In the event of a click on the Ad, the Ad code sends corresponding info to the AdVow Network server.
  7. Ad codes placed on publisher's page may handle additional task such as:
    • Setting a cookie used for capping, re-targeting and post impression tracking
    • Executing ad visibility or ad verification codes
    • Setting timer for rotating an Ad - upon certain amount of time in view, ad is replaced with another one loaded from AdVow Network server
    • Rotating ad(s) should the visitor navigate to another page of the same website
That way, all communications and parsing of Ad codes, verification, serving of Ads go through AdVow Network server.

Type of Ad codes used by AdVow Network

There are three main types of ad codes (methods) used by AdVow Network to display Ads on publishers' websites:

  • JavaScript tags
  • iframe tags
  • Image tags

1. Ad placement code: JavaScript tags

This method is very straightforward. Publisher places a JavaScript ad code directly into html code of the page - inside a div tags prepared for displaying certain size of ads called ad slot.

Advantages:

  • Simple to use
  • Can be used to handle responsive banner images for mobile phones
  • can be used to embed expandable/resizable banners and rich media ads
Disadvantages:
  • Ad code may be not parsed if the browser encounters problem parsing the page
  • Prone to being easily detected and blocked by Ad blockers by default settings
  • Ad may not be displayed on some browsers not supporting javascript
  • Ad may not be displayed if visitor has disabled support for javascript in his browser setting

2. Ad placement code: iframe tags

The iframe method of placing ads is great for the publisher as it isolates the ads displayed and prevent their code from interfering with the DOM tree of the website. It also speeds up loading of the ads, as the browser starts loading them instantly after reaching the iframe tag (as opposed to waiting for the JavaScript static ad tracker code to be loaded).

Advantages:

  • web browsers comply to the same origin policy which prevents accessing the publisher domain information (especially the parent frame) from a 3rd party domain script (in this context – the ad tracker)
  • Not easily detected/blocked by Ad blockers by default settings
Disadvantages:
  • Can not not be used to embed responsive/resizable banners and rich media ads
  • Much harder tracking ad visibility and running ad verification services
  • Some Browsers don’t Support iFrames

3. Ad placement code: Direct Image tags

Earlier versions of  AdVow Network used Image tags to serve ads on publishers' pages. However due to a lot of non-human bot traffic we have limited the use as exception, rather than the rule. Direct Image tags can also serve as a fallback method e.g. when JavaScript is not available. Although we still use the Direct Image tags method (especially for mobile-specific advertising), but it's getting pushed out by the above two methods.




KNOWLEDGE BASE Articles