Development Newsletters

Release: 28-08-2019

Release reminder

Please be reminded that soon we will introduce "Refactoring of campaigns and orders emission plan" release. Changes described on July 31st, 2019 will affect AdOcean API commands that will prepare our system to release new features in AdOcean.

Brand safety

We all agree that it is important to care about the context in which our brands are presented. AdOcean will help you to watch the brand safety so that the ads are displayed alongside the content that is right for the promoted brand. Thanks to "Context patterns" feature, you can create a list of phrases that can later be used in your campaigns' targetings. This will help you to ensure that the advertisements appear on pages with the specified content or protect from displaying them on pages with a non-matching content.

In the Settings tab you can select "Brand safety" from the left-side menu in order to define patterns which will be used in targeting.


In order to add a context pattern, write a chosen phrase in the "Pattern" text field and confirm by clicking an "Add" button. The defined phrase will be presented on the list below. By default, the list shows patterns sorted by the creation date (oldest first), but you can also sort them alphabetically by clicking an appropriate icon on the right side of the table.


If you already used the phrase in some targetings, but noticed that the phrase is incorrect (because of some typo, etc.), you can edit the existing pattern by clicking on it. Retype the phrase and click on the "check" icon to confirm the change. Such phrase will be updated in all targetings that it is used in, so you do not have to edit the campaigns. If the pattern is being edited but you want to cancel the change, click the "undo" icon. The phrases that are being edited are highlighted with the darker colour, while the one which edition has been confirmed is highlighted with the green colour.


Script configuration

In order to make the Brand Safety feature work, a special configuration of ado.config script needs to be implemented on the web page.

Please check the "Show configuration" link, present above the patterns list, which will reveal the details of configuration.

The configuration script needs to contain mode: "new" and contextPatterns setting.

Example contextPatterns configuration:

contextPatterns: {"domain" : "myao.adocean.pl","fileID" : "ijrbafhfbiwytdeuzmfelajcqxka","caseInsensitive" : true,"sentPatternsLimit" : 50}
  • caseInsensitive setting is set to true by default, which means that "EXAmple" and "example" match the same words (e.g. "Example" or "exAMple"). If you want to distinguish them, change this setting's value to false.
  • sentPatternsLimit is set to 50 by default, which means that a maximum number of patterns found on the web page is 50 and the rest of patterns will be ignored.

Example configuration code that enables context patterns
(needs to be inserted into HEAD section of the web page):


<script type="text/javascript" src="//myao.adocean.pl/files/js/ado.js"></script> <script type="text/javascript"> /* (c)AdOcean 2003-2019 */ if(typeof ado!=="object"){ado={};ado.config=ado.preview=ado.placement=ado.master=ado.slave=function(){};} ado.config({mode: "new", xml: false, consent: true, characterEncoding: true, contextPatterns: { "domain" : "myao.adocean.pl", "fileID" : "ijrbafhfbiwytdeuzmfelajcqxka", "caseInsensitive" : true, "sentPatternsLimit" : 50 } }); ado.preview({enabled: true}); </script>

Context targeting

Context targeting allows to display or block ads if the phrase predefined in the "Brand Safety" settings section is present on a web page.


  • Matching context patterns: At least one phrase from the matching patterns list has to be found on the web page in order to display an ad, otherwise the ad is not delivered. If the web page contains both phrases from the matching and rejected patterns list, the ad will not be delivered. If the matching context patterns list is empty, then only the rejected context patterns condition is checked.
  • Rejected context patterns: If at least one phrase from the rejected patterns list is found on the web page, then an ad will not be delivered.

Targeting can be assigned to a given order/surround or as an independent targeting with multiple placements and creatives.

New campaign planning algorithm - orders priority

We introduce a new campaign planning algorithm - Orders priority. With this option enabled, while choosing an ad to be delivered the emitter checks the priorities of orders and deliver ads according to their priority from the highest to the lowest. Emitter will choose to display the ad from the lower priority order only if the campaign plan is endangered.

To use this planning algorithm, open the campaign properties and set "Impression mode: For entire campaign" and choose the algorithm from the drop-down list.


New template - SDK Shutter banner

We present a new template allowing to display ads in mobile apps - SDK Shutter banner. Behaviour of this ad format is the same as of a standard version of the Shutter banner template described on the AdOcean demo page.

SDK version of the template does not support the "Animate on mouse wheel" option, so this parameter is not present. We also recommend to use "Horizontal" value in the "Orientation" parameter, because of the vertical scroll of an app content.

To ensure smooth animation, enable the hardware acceleration for placement in the application code (setHardwareAcceleration (true)).

adocean context targeting shutter banner