Setting up Moat and DFP

Setting up Moat and DFP isn't as straightforward as I would like. Here is a guide to getting it done

It may be how new I am to using Google’s DoubleClick For Publishers but I had a bit of a hard time getting our Moat script working.

If you have found this post I am going to guess you are facing similar problems. Here is what I did to get Moat working.

DoubleClick for Publishers

DoubleClick for Publishers, or DFP, is Google’s platform for delivering ads you have created yourself or imported from third parties. Moat does work with other things, this short guide just covers DFP integration.

Moat

Moat is a tool you can use with DFP to improve the tracking of your adverts. Specifically to track the view-ability of your advert. View-ability is becoming an important metric for businesses who serve adverts to be able to report on.

Getting the two to play nicely

The main part of the ad which appears on your website is ‘the Creative’.

In order to get Moat playing well with our creatives I had to create my own custom User-defined Template.

You can do this by clicking on;

  1. Creatives
  2. Creative Templates
  3. New Creative Template

Once here there are only a handful of more things you need to do;

  1. Name your template. This should be something memorable, you will be referring to it every time you upload new creative from now on.
  2. Add any custom variables you need. For our uses we needed an image, some dimension data for the image and the URL we wanted the image to go to when clicked.
  3. Add your snippet of code. I have included some sample code below.
<!-- main advert -->
<a href="%c[%URL%]" target="_blank"><img width="[%width%]" height="[%height%]" border="0" src="[%imagefile%]"></a>

<!-- moat code -->
<noscript class="MOAT-id?moatClientLevel1=%eadv!&moatClientLevel2=%ebuy!&moatClientLevel3=%eaid!&moatClientLevel4=%ecid!&moatClientSlicer1=%esid!&moatClientSlicer2=%epid!&zMoatPS=%%PATTERN:pos%%"></noscript>
<script src="https://z.moatads.com/moat-id/moatad.js#moatClientLevel1=%eadv!&moatClientLevel2=%ebuy!&moatClientLevel3=%eaid!&moatClientLevel4=%ecid!&moatClientSlicer1=%esid!&moatClientSlicer2=%epid!&zMoatPS=%%PATTERN:pos%%" type="text/javascript"></script>

Once you have your custom snippet when you add new Creative you can select from your newly created template from User-defined Templates.


Recent posts View all

Ruby

Forcing a Rails database column to be not null

How you can force a table column to always have something in it with Rails

Writing Marketing

We've deleted an article's worth of unhelpful words

We've improved several pages across our site by removing words that add no value, and often detract from the article.