Skip to main content

Advanced Targeting

Advanced Targeting is a feature that needs tomust be activatedenabled and requires additional setup. Please contact Support if you would like to make use of this feature.

Targets that fall under advanced targeting do not composecontain forecast datadata. andThey are best used in combination with SOV delivery.

Introduction

Advanced targeting allows admins of anthe Adhese instance admins to create complex targeting rules and save thosethem with a label. Sales and operationsOperations can chooseselect these targets from a list whilewhen booking a campaign.

Creating and Editing

To manage advancedAdvanced targetingTargeting in Adhese, click on the AdvanceAdvanced targetingTargeting link in the administrationAdministration screen. The following screen becomeswill visible:appear:

advanced_targeting1.png

The screen is divided into two parts:

  • addAdd new advanced target

  • advancedAdvanced target table

Click Add new advanced target if you want to add a new one. To add a new target, fill inenter a label, give it a value and hitclick the Add advancedAdvanced targetTarget button. The code has tomust be unique to be accepted byfor the application.application to accept it.

The Advanced targetsTargets table lists the created advanced targets.targets that have been created.

Creating a new Targeting Expression

Targeting expressions contain target identifiers and functions. The identifiers allow you to tell the system which targettargets you want to check, modify, etc…etc.… With the functions, you can express what you want to do with the values.

WithBy 'target values’values' we mean the incoming values of an ad request, independentregardless of how they were injected ininto the request. SoSo, this could be a value sent by the browser or app, or a segment picked up by a server-side mappingmapping, or a combination of both.

Defining which targets to use

Targets are referred to by their two-letter prefix code: “dt”, “co”, etc... just like in the POST body of an ad request. The exact values available for your Adhese instance shouldcan be found in the documentation of your account.

The values of each target are always considered to be multi-valued,valued. theirTheir type is List<String>, a list of alphanumericalalphanumeric characters.

If you know that a target is single-valued (as can be set in the ‘definitions’'definitions' of your instance), you can use last() to turnchange the type intoto String (or Void if an empty list).

Functions to express what to do with a target value

Each function acts on the values sent in by the request and is identified by the given 2-character target 2-char code. For example, given a request like the one below and using the target code ‘sg’'sg', which is often used for ‘segments’'segments':

https://ads-myadheseinstance.adhese.com/json/sl123/tlall/sgfamily;sports/ag45/dtdesktop/II456d676e8d6878s687/

We can identify the target by its 2-two-letter codecode,sgsg,’ and see two values: ‘family’ and 'sports'.

List of all functions

1. Check the presence of the target

defined(target_code)

Checks if a target is present, even if it has an empty string value.

Example
defined(sg)

will match the following requests

https://ads-myadheseinstance.adhese.com/json/sl123/tlall/sgfamily;sports/ag45/dtdesktop/II456d676e8d6878s687/


https://ads-myadheseinstance.adhese.com/json/sl123/tlall/sg/ag45/dtdesktop/II456d676e8d6878s687/

but not match this one

https://ads-myadheseinstance.adhese.com/json/sl123/tlall/ag45/dtdesktop/II456d676e8d6878s687/

2. Count number of target values

size(target_code)

Counts the number of values for a given target code.

Example
size(sg) > 1

will match

https://ads-myadheseinstance.adhese.com/json/sl123/tlall/sgfamily;sports/ag45/dtdesktop/II456d676e8d6878s687/


https://ads-myadheseinstance.adhese.com/json/sl123/tlall/sgfamily/ag45/sggourmet/dtdesktop/II456d676e8d6878s687/

but will not match this one

https://ads-myadheseinstance.adhese.com/json/sl123/tlall/sgfamily/ag45/dtdesktop/II456d676e8d6878s687/

 3. Check the presence of value

target_code intersects {'value'}

Returns true if ‘value’ is part of the values for the given target_code

Example
sg intersects {'sports'}

will match

https://ads-myadheseinstance.adhese.com/json/sl123/tlall/sgfamily;sports/ag45/dtdesktop/II456d676e8d6878s687/


https://ads-myadheseinstance.adhese.com/json/sl123/tlall/sgsports/ag45/sggourmet/dtdesktop/II456d676e8d6878s687/

but will not match

https://ads-myadheseinstance.adhese.com/json/sl123/tlall/sgfamily/ag45/dtdesktop/II456d676e8d6878s687/

4. Logical operators

(condition1 && condition2) || (condition3 && condition4)

&& expresses ‘and’, 
|| expresses ‘or’,
( ) round brackets can be used for grouping expressions

Example
sg intersects {'family'} || (sg intersects {'sports'} && dt intersects {'desktop'})

will match

https://ads-myadheseinstance.adhese.com/json/sl123/tlall/sgfamily;sports/ag45/dtdesktop/II456d676e8d6878s687/


https://ads-myadheseinstance.adhese.com/json/sl123/tlall/sgsports/ag45/sggourmet/dtdesktop/II456d676e8d6878s687/

but will not match

https://ads-myadheseinstance.adhese.com/json/sl123/tlall/sgsports/ag45/dtmobile/II456d676e8d6878s687/ 

5. Numerical comparison operators

atoi(last(target_code)) operator integer 

Compares the value of a target_code (converted from a string to an integer) with a fixed integer.

Available operators
  • < : less thenthan

  • <= : less thenthan or equal

  • > : greater thenthan

  • >= : greater thenthan or equal

  • <> : not equal

  • = : equal

Example
atoi(last(ag)) > 35 && atoi(last(ag)) <= 65

will match

https://ads-myadheseinstance.adhese.com/json/sl123/tlall/sgfamily;sports/ag45/dtdesktop/II456d676e8d6878s687/


https://ads-myadheseinstance.adhese.com/json/sl123/tlall/sgsports/ag65/sggourmet/dtdesktop/II456d676e8d6878s687/

but will not match

https://ads-myadheseinstance.adhese.com/json/sl123/tlall/sgsports/ag25/dtmobile/II456d676e8d6878s687/

6. Decode urls and split

last(split(decode64(last(target_code))),'/') = string

Converts the last value of the given target_code from base64 encoded to a string, splits it by slash and compares the last item with a string

Example
last(split(decode64(last(br)),'/')) = 'index.html'

will match

https://ads-myadheseinstance.adhese.com/json/sl123/tlall/sgsports/sgsport/ag25/dtmobile/II456d676e8d6878s687/rfL2Zvby9iYXIvaW5kZXguaHRtbA==/

but will not match

https://ads-myadheseinstance.adhese.com/json/sl123/tlall/sgsports/sgsport/ag25/dtmobile/II456d676e8d6878s687/rfL2Zvby9iYXIvb3ZlcnZpZXc=/