Skip to end of metadata
Go to start of metadata

User ID Mapping

When you send AppNexus a bid request, AppNexus responds with a bid only when we can map your request to an AppNexus user ID; without the AppNexus user ID, we can't apply basic trafficking strategies for our advertisers, such as user frequency capping and segment targeting. Mapping your user IDs to AppNexus' user IDs is therefore an essential part of your integration. To achieve this mapping, you use a user sync pixel, formatted differently depending on whether you store the mapping in your system or in ours.

AppNexus prefers that you store the mapping in your system. Please speak with your Account representative if you have questions.

On This Page

Storing the Mapping in Your System

To store the mapping on your end, you place a 1x1 image pixel on your pages that calls the AppNexus getUID service and returns AppNexus UUIDs to you for storage. Format the pixel as follows:

A redirect URL should be specified in the getUID call, and it should contain the $UID macro. This macro will be replaced with the AppNexus UUID when redirecting to the final URL, allowing the UUID to be taken in and mapped by your server.

Here's what happens when a user views a page containing the pixel:

  1. The browser calls the AppNexus getUID service.
  2. The getUID service replaces the $UID macro in the redirect URL with the AppNexus user ID (retrieved from the AppNexus browser cookie).
  3. The call is redirected to the final URL, where you receive the AppNexus user ID, map it to your ID for the user, and store the mapping in your system.

Using this approach, since you store the mapping on your end, you can include AppNexus user IDs in your bid requests.

Storing the Mapping with AppNexus

Storing user ID mapping with AppNexus is not supported with OpenRTB implementations.

To store the user ID mapping with AppNexus, you place a 1x1 image pixel on your pages that pushes your user IDs to AppNexus' mapUID service for storage with AppNexus. Format the pixel as follows, where the member parameter is the ID assigned to your company by AppNexus:

Here's what happens when a user views a page containing the pixel:

  1. The browser calls your URL, typically pointing to a service on your end similar to the AppNexus getUID service.
  2. The service retrieves your ID for the user from the user's browser cookie and inserts it into the user_id parameter in the query string of the redirect URL.
  3. The call is redirected to the AppNexus mapUID service, which stores the mapping between your user ID and ours in our system.

Using this approach, since AppNexus stores the mapping, you can include your user IDs in your bid requests. If you have multiple user IDs, separate them with semicolons.

Client-Testing URLs

Secure URLs

Secure Client-Testing URLs