Expand (2 creatives)
Overview
Formerly named "Expand (two creatives)". The "Expand (2 creatives)" creative template displays an ad that expands on mouse over or on click, using separate creatives for the collapsed and expanded states.
Demo
Compliancy
Criterion | Compliancy |
---|---|
Creative rotation | ❌ |
Friendly iFrame | ✅ |
IFrame buster | ✅ |
Multi-instance | ✅ |
Responsive web design | ❌ |
RTB | ❌ |
Viewability counting (MRC standard) | ✅ |
Creatives
Supported file formats:
- image
- creative script
- HTML5
Creative #1: for collapsed state
Creative #2: for expanded state
Note: In case of creative scripts, make sure you set up the size. Read about External functions for HTML5 creatives below under "Features".
Creative template parameters
Name | Description | Default value |
---|---|---|
Add background | Sets the background for the page. | false |
Background attachment | Specifies the background attachment. | scroll |
Background color | Specifies the background color. | #ffffff |
Background position | Specifies the background position. More info here. | center top |
Background repeat | Specifies the background repeat. | no-repeat |
Background url | Specifies the background URL. | |
Default close button image | Specifies if the default close button will appear. Tips: do not use the options "On mouse out collapses" while "Default close button image" or "Link text / HTML close button" are used. | true |
Default expand button image | Specifies if the default expand button will appear. Tips: do not use options "On mouse over expands", "On click expands" while "Default expand button image" or "Link text / HTML expand button" are used. | false |
Direction of expand | Specifies the ad's expand direction. | bottom |
Display time of the expanded state on page load | Specifies the display time of the expanded state on page load in seconds. | 0 |
Display time while losing focus | Specifies the display time while losing focus on the second creative in seconds; the "On mouse out collapses" option has to be checked | 0 |
Hide first creative when expand | If true, the first creative gets the visibility:hidden CSS property; | false |
Horizontal offset of second creative | Specifies the horizontal offset of the second creative in pixels. | 0 |
Link color | Sets the color of the expand link text. | #000000 |
Link color | Sets the color of the close link text. | #000000 |
Link font size | Sets the font size of the expand link text. | 14 |
Link font size | Sets the font size of the close link text. | 14 |
Link text / HTML close button | Adds the close text or the HTML code to the ad. | |
Link text / HTML expand button | Adds expand text or HTML code to the ad. | |
Link/button position property | Specifies the property of the link/button position. | inner-creative |
Link/button position property | Specifies the property of the link/button position. | on-the-corner |
Margin | Margin top and bottom of the first and second creatives (in px). | 10 |
Maximum number of expand per browser session | Specifies the maximum number of expansions per browser session. 0 means there is no expand capping. | 0 |
On click expands | Specifies if ad should expand on click. This option is useful for mobile web environment. Tips: you can also replace this option by using the expand button option. | true |
On mouse out collapses | Specifies if the ad should collapse on mouse out. | true |
On mouse over expands | Specifies if ad should expand on mouse over. This option does not apply for mobile web environment. | true |
Pushdown | If checked, the ad unfolds down the site. Note: works only for the bottom direction. | false |
Restart animation on each expand | Specifies if the animation of the creative should be restarted on each expand. Technically, this means, that the creative object will be created on every expand action. | false |
Tracking url | Make sure you add [timestamp] to the URL for cache busting. |
|
zIndex | Specifies the zIndex of the ad. | 9999 |
Features
The Expand (2 creatives) ad format contains two creatives used to display a collapsed state (first creative) and an expanded state (second creative) on mouseover or on click.
Supported browsers
This ad format is compatible with all major browsers:
- For Web:
- Chrome
- Firefox
- Safari
- Opera
- IE (11 and above)
- For Mobile Web:
- Safari on iOS (version >= 8.0)
- Chrome on Android (version >= 4.4)
External functions for HTML5 creatives
This creative template allows you to deliver multiple instances of the same template on the page. This causes difficulties in the communication when using a global function (expand and collapse). There are different functions defined for every instance on the page so you have to pass the format id in the function name, e.g.: pub_ist_expand_xxx()
, pub_ist_collapse_xxx()
, where xxx
is the format id.
HTML creatives
For HTML5 creatives, you can use expand and collapse methods with a post message.
Example of post message for expand button (communication between iframe and creative template):
var expandButton = document.getElementById("id-of-expand-button");
expandButton.onclick = function(){
window.parent.postMessage("pub_ist_expand_xxx", "*");
}
Example of post message for collapse button (communication between iframe and template):
var collapseButton = document.getElementById("id-of-collapse-button");
collapseButton.onclick = function(){
window.parent.postMessage("pub_ist_collapse_xxx", "*");
}
Keep in mind: If you wish to control the expand and collapse from the creative level you must uncheck these options in the creative template parameters:
- On mouse over expands
- On mouse out collapses
- On click expands
Metrics
This ad format supports the following interaction metrics:
- Expand the ad (metric name: Ad Expand)
- Collapse (metric name: Ad Collapse)
Limitations
n/a
Known issues
n/a
Release notes
- 05-03-2025 - Update for action pixels generation
- 24-01-2024 - Removed support for obsolete macros
- 17-04-2023 - Update sas-libs version to 1.1, remove document.write
- 03-01-2023 - Remove obsolete property of creative template
- 19-09-2019 - Removing the official flag from template (mobile version)
- 19-06-2019 - Refactoring of the template (start supporting features from the "Expand (2 creatives) for mobile" ad format, stop supporting Flash creatives)
- 16-08-2018 - Fix for Friendly iFrame size
- 27-03-2018 - Fix for hasAd (Smart Adserver library function)
- 07-02-2018 - Additional RTB parameters in viewability log
- 04-01-2018 - Enable viewability counting by default
- 02-10-2017 - Workaround for Chrome bug with iframe content on user back
- 20-09-2017 - Add tagID compatibility
- 12-09-2017 - Add viewability module
- 16-08-2017 - Support for standalone tag
- 22-05-2017 - JSON encoded "Link text / HTML" parameter for expand and close buttons
- 03-10-2016 - Ability to display few instances of template using one format (multi-instance)
- 10-08-2016 - Add pushdown and expand button options