Ad tags and tag types

Iframe/JavaScript tags

Iframe/JavaScript tags are the most commonly used type for placements that can deliver both standard images and rich media.

A combination of methods is used because not all browsers recognize the Iframe HTML element.

  • For browsers that do not recognize Iframes, we include JavaScript tags.

  • For browsers that recognize neither Iframes nor JavaScript tags, we include a set of standard tags as well.

Here's an example:

<IFRAME SRC="http://ad-region.doubleclick.net/adi/Nxxxx.site-keyname/Byyyyyyy;sz=widthxheight;kw=[keyword];click=;ord=[timestamp]?" WIDTH=X HEIGHT=Y MARGINWIDTH=0 MARGINHEIGHT=0 HSPACE=0 VSPACE=0 FRAMEBORDER=0 SCROLLING=no BORDERCOLOR='#000000'>
<SCRIPT language='JavaScript1.1' SRC="http://ad-region.doubleclick.net/adj/Nxxxx.site-keyname/Byyyyyyy;abr=!ie;sz=widthxheight;kw=[keyword];click=;ord=[timestamp]?">
</SCRIPT>
<NOSCRIPT>
<A HREF="http://ad-region.doubleclick.net/jump/Nxxxx.site-keyname/Byyyyyyy.n;sz=WidthxHeight;kw=[keyword];ord=[timestamp]?">
<IMG SRC="http://ad-region.doubleclick.net/ad/Nxxxx.site-keyname/Byyyyyyy.n;kw=[keyword];ord=[timestamp]?" BORDER=0 WIDTH=X HEIGHT=Y ALT="Click Here">
</A>
</NOSCRIPT>
</IFRAME>
According to the standards for HTML, tags placed between <iframe> and </iframe> tags are ignored, so in most cases only the Iframe tags are invoked. The JavaScript and standard tags are included as failsafe methods to ensure that ads are served even to users who are using obsolete browsers.

Anatomy of Iframe Tags

To get a better understanding of the Iframe tags, let's look at them part by part.

<IFRAME SRC="http://ad-region.doubleclick.net/adi/Nxxxx.site-keyname/Byyyyyyy;sz=widthxheight;kw=[keyword];click=;ord=[timestamp]?" WIDTH=X HEIGHT=Y MARGINWIDTH=0 MARGINHEIGHT=0 HSPACE=0 VSPACE=0 FRAMEBORDER=0 SCROLLING=no BORDERCOLOR='#000000'>

IFRAME SRC: An HMTL Iframe (inline frame) tag that allows an HTML page to be embedded in another HTML page. The SRC parameter tells the browser where to find the HTML page to load into the Iframe.

http://ad-region.doubleclick.net/adi/Nxxxx.site-keyname/Byyyyyyy;sz=widthxheight;kw=[keyword];click=;ord=[timestamp]?: The parameters of the URL are the same as in standard tags, with two exceptions:

  • The adi parameter tells the DART ad servers that the URL is part of an Iframe tag.

  • Depending on how the advertiser sets up the placement, the click= parameter may be included. This parameter is used to redirect clicks to a third-party site, typically so that the site publisher can perform its own click counting. Keep in mind that DART uses a variety of methodologies to ensure accurate counting of clicks, so there may be discrepancies between our count and that of a third party.

    To use the click= parameter, the publisher needs to insert a URL as the value of the parameter, followed by %u. When a user clicks on an ad, the browser will first direct the browser to the URL specified as the value of click=, allowing for external counting. The %u tells the DART ad server to send the user to the landing page specified in DoubleClick for Advertisers.

    If the click= parameter is used, the publisher should make sure that it's used in both the Iframe and the JavaScript tags. The publisher also needs to redirect standard tags to the third-party site; what methodology is used is up to the publisher.

WIDTH=X HEIGHT=Y MARGINWIDTH=0 MARGINHEIGHT=0 HSPACE=0 VSPACE=0 FRAMEBORDER=0 SCROLLING=no BORDERCOLOR='#000000': These parameters set the dimensions and other features of the Iframe. By default, they are set up to integrate the Iframe seamlessly with the surrounding webpage.

Anatomy of JavaScript Tags

To get a better understanding of the JavaScript tags, let's look at them part by part.

<SCRIPT language='JavaScript1.1' SRC="http://ad-region.doubleclick.net/adj/Nxxxx.site-keyname/Byyyyyyy;abr=!ie;sz=widthxheight;kw=[keyword];click=;ord=[timestamp]?">

SCRIPT language='JavaScript1.1' SRC: An HTML script tag that tells the browser to read as JavaScript the content retrieved from the source (SRC) location.

http://ad-region.doubleclick.net/adj/Nxxxx.site-keyname/Byyyyyyy.n;abr=!ie;sz=widthxheight;kw=[keyword];click=;ord=[timestamp]?: The parameters of the URL are mostly the same as in standard tags, with three exceptions:

  • The adj parameter tells the DART ad servers that the URL is part of a JavaScript tag.

  • the abr=!ie parameter tells the DART ad servers not to serve JavaScript content if the browser is Internet Explorer.

    According to HTML conventions, browsers are not supposed to read any content between <iframe> and </iframe> tags. As such, any browser that recognizes Iframes should read only the DART Iframe tags, not the JavaScript tags. However, some obsolete versions of Internet Explorer read both sets of tags. The abr=!ie parameter ensures that these browsers are served only one ad for each set of DART ad tags.

    This parameter is included only in the Iframe/JavaScript combination tags, not in JavaScript tags without Iframes.
  • Depending on how the advertiser sets up the placement, the click= parameter may be included. This parameter is used to redirect clicks to a third-party site, typically so that the site publisher can perform its own click counting. Keep in mind that DART uses a variety of methodologies to ensure accurate counting of clicks, so there may be discrepancies between our count and that of a third party.

    To use the click= parameter, the publisher needs to insert a URL as the value of the parameter, followed by %u. When a user clicks on an ad, the browser will first direct the browser to the URL specified as the value of click=, allowing for external counting. The %u tells the DART ad server to send the user to the landing page specified in DoubleClick for Advertisers.

    If the click= parameter is used, the publisher should make sure that it's used in both the Iframe and the JavaScript tags. The publisher also needs to redirect standard tags to the third-party site; what methodology is used is up to the publisher.

<NOSCRIPT>: This element is used to define alternate content to be displayed if a script is not executed. In the DART ad tags, the alternate content consists of standard tags.