AMP Integration Guide

How To Integrate with AMP

We support AMP!  To integrate with AMP there are a few things to be aware of when getting started. Please read through this guide on all of the processes of getting setup.

 

Amp tag via DFP:


Please make sure your setting in DFP look like the below example: (Click image to enlarge)

 

When running AMP in DFP the tag that you will use, will look exactly the same as a standard UNruly in-article tag, an example tag is below.

<script>
    var unruly = window.unruly || {};
    unruly.native = unruly.native || {};
    unruly.native.siteId = XXXX;
</script>
<script src="//video.unrulymedia.com/native/native-loader.js"></script>

 

For testing the AMP tag please use the following example.

Please NOTE – (That this is a test tag. This is NOT to be used live and to see delivery you’ll need to be added to the campaign on our end)

<script>
    var unruly = window.unruly || {};
    unruly.native = unruly.native || {};
    unruly.native.siteId = XXXXXXX;
    unruly.native.tagId = '5822643';
</script>
<script src="//video.unrulymedia.com/native/native-loader.js"></script>

 

Direct Integration on AMP Page


If you would like to integrate with us directly on AMP without using DFP, an example tag is below.

<script>
<amp-ad
width="400"
height="300"
type="unruly"
data-site-id="XXINSERTSITEIDXX">
</amp-ad>
</script>


Vertical Video on a AMP Page


If you would like to also use full portrait video on mobile (Vertical Video) You will need to,  as well as using the above tags, need to alter your DFP config in order to accommodate for the the larger ad unit.

Within your DFP configuration, you will need to change the size of the DFP CreativeLine Item and Ad Unit.  (Examples below)


For the Creative, the Target Ad Unit Size must be 800×600 (see screenshot):


For the Line Item, the Inventory Sizes must include 800×600 (see screenshot):


For the Ad Unit, the Sizes must include 800×600 (see screenshot):


Limitations

When using AMP via Unruly please be aware of the following –


  • Cannot serve into 1×1 – We SUPPORT either fixed or responsive.
  • No Safe Frames (Via DFP)
  • We can deliver into multiple placements on the page, however we would not be able to frequency cap properly.
  • When we have no ad, at the moment a white space would be displayed rather than collapsing