Web demo for Pocket Media Native Ads - using the javascript library
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
ad-builder
custom-config
LICENSE
README.md

README.md

native-ads-web-demo

This project is a demo of the integration of the Pocket Media Native Ads web library.

The library is a javascript utility that helps you create ads that blend in your website, by specificying the HTML of the ad units and where they should be placed.

Method 1: custom configuration

This is the most flexible and versatile solution. It allows you to define and customize an ad unit - via a JSON configuration or with code.

In the example contained in the custom-config folder you can see how to specify to the library which configuration you want to use (via the ADLIB_OVERRIDES variable), and later, loading the library itself:

<script> ADLIB_OVERRIDES={"configFileLocation":"/assets/js/ad-config.json"}</script>
<script type="text/javascript" src="https://s3.eu-central-1.amazonaws.com/pmnativeads/library/current/pm-native.js" data-application-id="12345" async></script>

Method 2: ad builder

Via our Ad Builder Chrome extension it is possible to define visually the configuration for an ad unit. After its crreation, it will be stored in the server, so to load the ads you only need to include a reference to the script, indicating which ad placement you wish to load:

<script type="text/javascript" src="https://s3.eu-central-1.amazonaws.com/pmnativeads/library/current/pm-native.js" data-application-id="12345" async></script>

Note: the data-application-id value should not be 12345, but your application ID. The library will communicate with the backend to check which placements apply for your website, in the specific URL the user is visiting.

You can find this example in the ad-builder folder.