Tutorials

Basic native ad setup

These tutorials cover Advisible Native Ads from a website integration perspective.

The ads in the tutorials originate from a publisher account in the platform and are served the same way they would in any other production environment. For this reason, under rare circumstances no ads will be displayed, for example due to maintenance work.

This example demonstrates a basic native ad setup. It loads a simple, unstyled teaser template and connects the builtin Placement provider, which requests ads from the platform.

Setup
adk.config()
    .addTemplate('com.advisible.native.teaser', adk.template.config()
        .url('teaser.html'))
    .addContainer('native-teaser', adk.container.config()
        .provider('adk.placement'))
    .apply()
    .init(publisherId)
Template
<a href="%url%">
    <img height="100" %srcAttrs% />
    <h2>%headline%</h2>
    %advertiser%
    %lead%
</a>
Result