Live preview a creative
?adhesePreviewCreativeId=71578& adhesePreviewSlotId=51512& adhesePreviewCreativeTemplate=HALFP& adhesePreviewWidth=300& adhesePreviewHeight=250& adhesePreviewTemplateFile=preview.html& adhesePreviewCreativeKey=null
The next table describes the parameters from the above live preview URL:
Parameter | Description |
---|---|
adhesePreviewCreativeId | The ID of the creative |
adhesePreviewSlotId | The ID of the booked position |
adhesePreviewCreativeTemplate | The code of the creative's format |
adhesePreviewWidth | The width of the creative in pixels |
adhesePreviewHeight | The height of the creative in pixels |
adhesePreviewTemplateFile | |
adhesePreviewCreativeKey | The key of the creative |
Requesting a preview of a creative can be done using one of the following languages:
JavaScript
http://[account]-preview.adhese.org/creatives/preview/tag.do?id=[adhesePreviewCreativeId]&slotId=[adhesePreviewSlotId]
This URL must be set as the source for a <script>
tag. The URL will return regular JavaScript, which can contain document.write statements. This script should be called in the same place as a live ad would be called.
<script>
tag and the URL.JSON
https://[account]-preview.adhese.org/creatives/preview/json/tag.do?id=[adhesePreviewCreativeId]
JSONP
https://[account]-preview.adhese.org/creatives/preview/jsonp/tag.do?id=[adhesePreviewCreativeId]&callback=[callbackFunctionName]
The JSON / JSONP preview can be requested asynchronously. The returned JSON has the same structure as the live JSON and can be processed similarly to the live JSON response.
Multiple creatives
The JSON / JSONP URLs also support multiple creatives. Repeating the id
parameter will return multiple creatives:
.../tag.do?id=[adhesePreviewCreativeId]&id=[adhesePreviewCreativeId]
You can find more info on previewing multiple creatives at Composing a live preview with more than one creative. This method will add all necessary info to the page URL and displays a preview of more than one creative on the same page.
Preview domains
To preview XML files (such as VAST) correctly in the Adhese interface, a crossdomain.xml file is added to the preview host domain's root server. For security reasons, the process of previewing a creative is hosted at a different domain than your original admin domain of Adhese. This inhibits the crossdomain.xml file to have free access to the admin host. The crossdomain.xml file is a cross-domain policy file that enables a web client to talk to servers other than the one it is hosted on.