You are here: Publishers > Orders > Creatives > Creative template sample

Creative template sample

Last updated on July 7, 2016

This example template creates a simple image bannerThis is an ad that appears on a web page which is typically hyperlinked to an advertiser’s website. Banners can be images (GIF, JPEG, PNG), JavaScript programs or multimedia objects (For example, Java). that clicks through to a new window. You can add other third-party tracking pixels if needed.

Custom Macros

The table below describes the macrosFor OpenX, a command enclosed in curly braces {} that dynamically inserts attributes into your HTML or third-party ad creatives and click-through URLs when OpenX serves an ad. Other macros, like from your video player, may have alternate formatting. that you would need to create in the Custom Macros section of the Create Template screen when defining a creative template.

Name

Type

Notes

ImageURL URL Required
Imagewidth Number Required
Imageheight Number Required
ClickthroughURL URL Required
Targetwindow List Required
Thirdpartyimpressiontracker1 URL Optional
Thirdpartyimpressiontracker2 URL Optional
Imageborder Number Optional

Code Snippet

The code below is a sample of what you would put in the Template Code section of the Create Template screen. This code snippet references the custom macros above.

<a href="%c[%ClickthroughURL%]" target="[%Targetwindow%]">
<img width="[%Imagewidth%]" height="[%Imageheight%]" border="[%Imageborder%]" src="[%ImageURL%]"></a>
<div style="position:absolute;top:0px;right:0px;width:1px;height:1px;visibility:hidden;border:none;">
<script type="text/javascript">
var trackingPixel="[%Thirdpartyimpressiontracker1%]";if(trackingPixel.indexOf("http")==0)document.write('<iframe src="'+trackingPixel+'" height="1" width="1" style="width:1px !important;height 1px !important"></iframe>');
var trackingPixel="[%Thirdpartyimpressiontracker2%]";if(trackingPixel.indexOf("http")==0)document.write('<iframe src="'+trackingPixel+'" height="1" width="1" style="width:1px !important;height 1px !important"></iframe>');
</script>
</div>

This topic applies to Ad Server.

Feedback form