The Adzerk Developer Hub

Welcome to the Adzerk developer hub. You'll find comprehensive guides and documentation to help you start working with Adzerk as quickly as possible, as well as support if you get stuck. Let's jump right in!

User-Level Targeting

User-level targeting involves UserDB, a data management platform that comes with the Business & Enterprise tiers.

User-level targeting (aka UserDB) is highly recommended if you can save a persistent ID about your users (such as through cookies, a log-in username, etc). With UserDB you can create valuable segments you can sell to advertisers at higher rates, as well as optimize delivery to show the most relevant ads and drive more revenue (not to mention improve the user experience).


User-level targeting refers to targeting that knows information about the particular individual seeing the ad. This data is tied to a persistent ID called the UserKey, which is passed in the key value of the user object of the Decision API request. This information is stored in Adzerk's UserDB in JSON format.

The main uses cases of user-level targeting are:

Interest / Behavioral Targeting
Excluding Ads Based on Behavior
Demographic / Custom Properties Targeting

Creating the UserKey

As user-level targeting requires the passing of this persistent UserKey, you will need to be able to store the UserKey on your end, match it to a user at time of impression, and then pass it in the request.

For creating, there are a few options:

You create:

Some common options include:

Persistent Identifier

Log-In Username

Generally works across devices

Mobile Identifiers (iOS IDFA; Android GAID)

If an app, easy to find and send; however, not cross-device and can be reset

Internal proprietary identifier

Generally works across devices. Can be stored in a cookie and pulled at time of impression

The UserKey is in string format and does not need to be an integer

The UserDB API can be accessed without an API key, so you shouldn't use vulnerable User ID to represent your users in UserDB.

For privacy reasons, do not send anything that's PII (personally identifiable information).

Adzerk creates:

  1. If the user field is blank in the ad request, Adzerk will generate a random GUID and send it back in the Decision API Response
  2. You'll need to store this ID and map it to the specific user
  3. In future requests, send this UserKey in the user parameter if you can identify who's seeing the ad

In all instance, in order for UserKey to work, you will need to store this UserKey, be able to tie it to the user seeing the ad, and then send it in the request. The actual storage of user information - such as past behavior and demographic information - will be stored in Adzerk's UserDB and cross-referenced by the Ad Decision Engine.

Passing UserKey

For user-level targeting to work, you'll need to send the same persistent UserKey ID as the key value in the user parameter in the Decision API request ever time the user sees an ad.

Adzerk will cross-reference this UserKey with UserDB and see if there's a record associated with the User. If there is a match, this information will be used by the Ad Decision Engine to pick the right ad, based on what type of user-level targeting you have set up.

An example Decision Request with a Userkey included is:

  "placements": [
      "divName": "homepage",
      "networkId": 123,
      "siteId": 456,
      "adTypes": [5],
      "eventIds": [12,13,14]
  "user" : {
    "key": "ad39231daeb043f2a9610414f08394b5"

User-Level Targeting