Generally speaking, the publisher books campaigns directly by uploading creative and configuring click-through URLs. Sometimes, however, an advertiser may request the publisher to run a third-party tag, where the advertiser's ad server is called to display the ad to the end-user.
In order to make use of a third-party tag provided by the advertiser, the following steps should be followed:
1. In the campaign for this advertiser, create an appropriate placement with the desired format.
2. When creating an ad, choose "Javascript" as the ad type.
3. Paste the third-party tag provided by the advertiser.
Make sure that what you're pasting is in fact Javascript code. Often the advertiser or the network will provide an HTML tag (generally wrapped in <SCRIPT> tags), in which case you need to make sure to remove or transform the <SCRIPT> tags before pasting the result in the "Javascript Code" field of the ad type. The way to proceed depends on the contents of the original <SCRIPT> tag:
a) If the <SCRIPT></SCRIPT> tags surround pure Javascript code, then simply strip away the <SCRIPT></SCRIPT> tags themselves;
b) If the <SCRIPT> tag refers to an external Javascript via the "SRC" attribute (e.g., <SCRIPT SRC=...></SCRIPT>), then the <SCRIPT></SCRIPT> block should be wrapped inside a Javascript string (quoted) and fed to document.writeln() for embedding in the page contents.
An example for a Google AdSense tag (fictitious) is shown below.
Original AdSense tag:
<script type="text/javascript">
google_ad_client = "pub-12345";
google_ad_slot = "12345";
google_ad_width = 300;
google_ad_height = 250;
</script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
The transformed tag, pasted in the "Javascript Code" field of the AdGear Javascript ad type is then:
google_ad_client = "pub-12345";
google_ad_slot = "12345";
google_ad_width = 300;
google_ad_height = 250;
document.writeln('<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>');
Note that the first <SCRIPT></SCRIPT> tag was simply stripped, whereas the second was surrounded in document.writeln() and quoted using single quotes since the contents of the string already make use of double quotes (alternately, double quotes and proper escaping could have been used).



