Outstream Video

Outstream video ads can be placed inside any mobile web content. You can load an outstream video using the following Ad Tag snippet:

Example Snippet:

<div id="REPLACE_WITH_YOUR_ID_OF_CHOICE" style="padding: 0px"></div>
<script type="text/javascript" src="https://soma-assets.smaato.net/js/smaatoAdTag.js"></script>
<script>
    function callBackForSmaato(status){
        if(status == "SUCCESS"){
            console.log("callBack is being called with status : " + status);
        } else if (status == "ERROR"){
            console.log("callBack is being called with status : " + status);
        }
    };
    SomaJS.loadAd({
        adDivId : "REPLACE_WITH_YOUR_ID_OF_CHOICE",
        publisherId: REPLACE_WITH_PUBLISHER_ID,
        adSpaceId: REPLACE_WITH_ADSPACE_ID,
        format: "outstream",
        formatstrict: true,
        dimension: "medrect",
        width: 300,
        height: 250, // Dimension values are examples and should match SPX configuration
        outstreamSelectors: ["#REPLACE_WITH_YOUR_ID_OF_CHOICE"],
        sync: false
    }, callBackForSmaato);
</script>

 

Please Note:

  • The value for ‘format’ key should be ‘outstream
  • The value for ‘outstreamSelectors‘ should be the div id where the video should be placed.
  • There is no callback needed. The outstream tag will try again after 10 seconds if no ad is received.
    • The time is currently not configurable.

Generating Outstream Video Tags

If you are interested in integrating outstream video ads, we highly recommend using our Ad Tag Generator in SPX (at least for configuring and testing your setup.)

To Access our Ad Tag Generator: https://spx.smaato.com/publisherportal/pages/integration/integration.xhtml

From here, you can select an outstream adspace that you have created under Inventory, then copy your generated Ad Tag and paste it into your page.

Testing Your Tag

To test your setup, use the following test credentials in your tag:

publisherId: 0, adSpaceId: 3090,

Essentially it will look something like this:

Modified: September 24, 2019 at 8:43 pm