Introduction

The Sponsored Listings Unit provides Brand listings matched to a search term, for example:

https://assets.mocha.global/widget/search_example.png

Configuration

Your representative will provide you with one or more campaign identifiers which deliver brands according to your requirements, including geo-matching and monetisation options.

These campaign identifiers are used to track revenue generated from the unit and as such you may which to request more than one campaign identifier to differentiate between performance of different units in a page, or across different sites.

With the campaign identifier, to setup a page to render the unit, include the following script in the page.

Note the configurations object in the code below, this block specifies the campaign_id that you are using, the number of rows you would like the the unit to display, and the id of the div in the page that you would like the init to target.

<script>
       // Include the ad widget
       (function (w,d,s,o,f,js,fjs) {
            w['SEAdWidget']=o;w[o] = w[o] || function () { (w[o].q = w[o].q || []).push(arguments) };
            js = d.createElement(s), fjs = d.getElementsByTagName(s)[0];
            js.id = o; js.src = f; js.async = 1; fjs.parentNode.insertBefore(js, fjs);
        }(window, document, 'script', 'mochaads', '//assets.mocha.global/widget/search_aw_1.5.9.js'));

        // Configure
        var configurations =  {
          "unit1": {
            "campaign_id": "AQoGCQEBDAENBgIHBAgOBQ",
            "size": 2,
            "dest": "unit1div"
          },
        };
        // Initialise
        mochaads('init', configurations);

        //  Render
        mochaads('show', {
          target: 'unit1',
          text: 'budget'
        });
</script>

Later in the page a target div exists where the ad will be shown:

<div id="unit1div"></div>

Configuration Detail

The configuration block specifies each of the units in the page you wish to show

var configurations =  {
          "unit1": {
            "campaign_id": "AwMEAw4OCgEIBA0OBAABDg",
            "size": 2,
            "dest": "unit1div"
          },
        };

In the above example: