Custom targeting: Boolean groups

This targeting option may not be available on your system.

With Boolean groups you can combine AND and OR between the values in any way you like. For example, a campaign may be booked to the boolean parameters

```  red OR blue OR green
AND
yellow OR purple```

Setup

First you need to setup the targeting values. This is done under Network setup. Add the new group (each customer may only have one boolean group defined) and then enter the values in the text box.

The order of values is important: The position in the list decides what the CU tag should look like. If your site is already using boolean groups, always add new values at the end of the list.

Request syntax

Boolean groups function much like custom targeting: multiple choice.

The syntax is c3-POSITION_NUMBER=VALUE, where VALUE is a hexadecimal integer.

The first part of the variable name is a constant that tells EmediateAd that it is boolean groups:

c3-

Unlike “multiple choice”-targeting, there is no part which refers to the custom targeting group - each customer may have only one boolean group defined.

The second part of the variable name refers to the position number.

The position number and the value are calculated like this:

Example 1

The targeting parameter has choice number 67 (defined in network setup)

The position number is calculated like this:

• Position number = (choice number - 1) / 64 = (67 – 1) / 64 = 1
• Value number = 2 ^ ((choice number – 1) % 64 ) = 2 ^ ((67 – 1) % 64) = 2 ^ 2= 4

The value number needs to be converted to hexadecimal form. In this case it is still 4.

The request then becomes c3-1=4

If you have multiple choice numbers in the request, you need to run this formula for each choice and add them to the proper position variable.

Example 2

The targeting parameters have choice numbers 5, 33 and 129. The formula becomes:

• Position number = (choice number - 1) / 64 = (5 – 1) / 64 = 0
• Value number = 2 ^ ((choice number – 1) % 64 ) = 2 ^ ((5 – 1) % 64) = 2 ^ 4 = 16 = 1016
• Position number = (choice number - 1) / 64 = (33 – 1) / 32 = 0
• Value number = 2 ^ ((choice number – 1) % 64 ) = 2 ^ ((33 – 1) % 64) = 2 ^ 32 = 4294967296 = 10000000016
• Position number = (choice number - 1) / 64 = (129 – 1) / 64 = 2
• Value number = 2 ^ ((choice number – 1) % 64 ) = 2 ^ ((129 – 1) % 64) = 2 ^ 0 = 1 = 116

Added together this will be c3-0=100000010&c3-2=1

These values can also be previewed under network setup. By clicking on the targeting names in the right-hand side column, the values of the selected names are added up and the sum is displayed in the box header next to the parameter name.

Campaign booking

Boolean groups are available under the “custom targeting” header on the Targeting page.

• Under the subheader for the boolean group, click the “add” button. A list of checkboxes will appear
• All values checked here will be OR-related, that is only one of them need to be present in the ad request
• To add an AND-relation, click “add” again and a new list of checkboxes will appear.
• Everything selected here is also OR-related - only one of the values need to be present in the ad request - but this is in addition to the values in the previous list.

Example:

Click Add and select “Red”, “Blue” and “Green” from the available values in the first list.

Clicks Add again and select “Yellow” and “Purple” from the available values in the second list.

The campaign is now booked to (Red OR Blue OR Green) AND (Yellow OR Purple).

The ad request must contain one of red, blue or green and also one of yellow or purple, in order for the campaign to display.

It is possible to let the same value appear more than once.

Example

A campaign is booked to (Red OR Blue) AND (Red OR Purple)