Back

This article describes how to set up the AppNexus Real Time Segments connector in your Universal Data Hub account.

This connector is currently available as an Experiment. (Learn more)

In this article:

Table of Contents Placeholder

Connector Actions

Action Name AudienceStream EventStream
Add User to Segment
Remove User From Segment

Configure Settings

Go to the Connector Marketplace and add a new connector. Read the Connector Overview article for general instructions on how to add a connector.

After adding the connector, configure the following settings:

  • Username
    • Required.
    • Enter your API username.
    • This is the same username used to log into your account.
  • Key ID
    • Required.
    • Must match the name set when registering your public key.
  • Private Key
    • Required.
    • Provide your private key matching the registered public key in your account.
    • Private key must be generated with RSA algorithm and transformed to PEM PKCS #8 format.
      For more information, see: Creating Private and Public Keys.

Generating API Keys

To ensure secure communication, AppNexus API uses public and private key pairs. Key pairs can be generated with a free and widely available OpenSSL command line tool.

Run the following commands in order:

  • openssl genrsa -out my-api-key 2048
  • openssl pkcs8 -topk8 -inform PEM -outform PEM -in my-api-key -out my_private_key -nocrypt
  • openssl rsa -in my-api-key -pubout -outform PEM -out my-public-key

Explanation of each command:

  • Generate a new key using RSA algorithm (2048-bits key size) in traditional format.
  • Convert key in traditional format to PEM PKCS #8 format.
    This is your private key.
  • Output a public key in PEM format from key in traditional format.
    This is your public key.

The above example names the generated key files as 'my-api-key', 'my-private-key' and 'my-public-key',. These are arbitrary names and can be named as you see fit.

Once generated, open the files in a text editor and copy the key values accordingly. Create Your Public Key JSON File first, then Register Your Public Key in your AppNexus account and provide its private key in the connector configuration screen.

Action Settings - Parameters and Options

Click Next or go to the Actions tab. This is where you configure connector actions.

This section describes how to set up parameters and options for each action.

Action - Add User to Segment

Parameters

Parameter Description
Segment ID
  • Optional.
  • The AppNexus segment to add user to.
  • You may either use Segment Code and Member ID together or Segment ID alone, but not both.
Member ID
  • Optional.
  • The member ID of the segment owner.
  • Required if using Segment Code.
Segment Code
  • Optional.
  • User-defined name for the segment.
  • Required if using Member ID.
Expiration
  • Optional.
  • The lifetime of the user-segment association in minutes, starting from when we read it.
  • A value of zero (0) means that the segment will never expire.
Value
  • Optional.
  • A numeric value you would like to assign to a user within the segment.

Action - Remove User From Segment

Parameters

Parameter Description
Segment ID
  • Optional.
  • The AppNexus segment to add user to.
  • You may either use Segment Code and Member ID together or Segment ID alone, but not both.
Member ID
  • Optional.
  • The member ID of the segment owner.
  • Required if using Segment Code.
Segment Code
  • Optional.
  • User-defined name for the segment.
  • Required if using Member ID.

Vendor Documentation