Custom Targeting

Prerequisites

  • Fuse tags received from Publift
  • Fuse tags implemented on page
  • Ads displaying on page

 

Description

Custom Targeting is very simple to setup and is used when setting up targeting in DFP for things like campaigns.

For the Fuse tag it follows the following format: 

fusetag.setTargeting('key', 'value');  - Sets page level key value targeting.

fusetag.setTargeting('key', ['value1', 'value2']) - Sets page level key value targeting, however you can pass in an array of values.

An example of how this custom targeting would like is below:

Page Level targeting with single Value:

<script type="text/javascript">
var fusetag = fusetag || {que : []};

fusetag.que.push(function(){
fusetag.setTargeting("page", "simple_html");
});
</script>

 

Page Level targeting with an Array of Values:

<script type="text/javascript">
var fusetag = fusetag || {que : []};

fusetag.que.push(function(){
fusetag.setTargeting("industry", ["automotive", "cars"]);
});
</script>

Implementation

In order to enable custom targeting the fusetag object has to be declared on the page. This can be achieved by adding the following line of code just below the Fuse <script> in the head.

Note: Change the Key and Value(s) to something more meaningful to your site /page.

<script type="text/javascript">
var fusetag = fusetag || {que : []};

fusetag.que.push(function(){
fusetag.setTargeting("page", "simple_html");
fusetag.setTargeting("industry", ["automotive", "cars"]);
});
</script>

To see this implmented, you can simply view the source of this page.