Content Sitebar: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 18: Line 18:
physical HTML5 zip file or 3rd-party iFrame, the creative agency provides a responsive ad with a ready functionality that automatically downsizes, upsizes, positions or replaces the content of the creation (HTML, CSS, texts, images, other …) to suit the provided display area (which may be larger or smaller than the initially optimised format) and that ensures full and optimum presentation. Please also make sure the click button/area is of a corresponding size.
physical HTML5 zip file or 3rd-party iFrame, the creative agency provides a responsive ad with a ready functionality that automatically downsizes, upsizes, positions or replaces the content of the creation (HTML, CSS, texts, images, other …) to suit the provided display area (which may be larger or smaller than the initially optimised format) and that ensures full and optimum presentation. Please also make sure the click button/area is of a corresponding size.
{{Baustein|titel=Scroll depth|text=The scroll depth can be important for the creation of the advertising. This is provided by iq digital as a postMessage named ''''scroll_message_sitebar'''' and can be queried using the value '''data.scrollPercent''' (values are integers: 0,1..10,11,12..30..50..99,100) , as in the example here.
{{Baustein|titel=Scroll depth|text=The scroll depth can be important for the creation of the advertising. This is provided by iq digital as a postMessage named ''''scroll_message_sitebar'''' and can be queried using the value '''data.scrollPercent''' (values are integers: 0,1..10,11,12..30..50..99,100) , as in the example here.
{event_id: 'scroll_message_sitebar', scrollPercent: 54}


<syntaxhighlight lang="javascript" line="line" style="font-size:16px">
<syntaxhighlight lang="javascript" line="line" style="font-size:16px">
window.addEventListener('message', function (e) {
const handler = (event) => {
        if (e.data.event_id == 'scroll_message_sitebar') {
window.addEventListener('message', function (event) {
            console.log(data.scrollPercent);
if(Object.prototype.hasOwnProperty.call(event.data, 'event_id') && event.data.event_id === "scroll_message_sitebar") {
        }
console.log(event.data.scrollPercent);
});
            // TO SOMETHING HERE
</syntaxhighlight>}}
}
});
  };
 
  window.addEventListener('message', handler);
 
<includeonly>|wirdReferenziert=true</includeonly>
<includeonly>|wirdReferenziert=true</includeonly>
}}
}}