Page tree

Skip to end of metadata
Go to start of metadata

Universal Pixel Service

The Universal Pixel Service is a set of REST API services that give you access to one or more Universal Pixels and any associated audiences and conversions.

On This Page

Universal Pixel Service Overview

The Universal Pixel provides insights into the interactions that users have with your website so you can easily segment these users, measure actions they take, and better target your ads. The Universal Pixel Service has three sets of endpoints:

See below for examples of each Universal Pixel endpoint.

Universal Pixel REST API

You create a Universal Pixel using the /universal-pixel endpoint (see ## for more information). Once a Universal Pixel is created, you can use the /universal-pixel endpoint to view it, update it, or delete it.  

Audience REST API

You create a Universal Pixel audience using /universal-pixel/audience endpoint. Once an audience is created, you can use the /universal-pixel/audience endpoint to view it, updated it, or delete it. 

Conversion REST API

You you create a Universal Pixel conversion using  /universal-pixel/conversion endpoint. Once a conversion is created, you can use the /universal-pixel/conversion endpoint to view it, updated it, or delete it. 

 

Universal Pixel REST API

View a list of Universal Pixels associated with a member or advertiser:

GET https://api.appnexus.com/universal-pixel/pixel

Create a new Universal Pixel:

POST https://api.appnexus.com/universal-pixel/pixel

View a Universal Pixel by ID:

GET https://api.appnexus.com/universal-pixel/pixel?id=UNIVERSAL-PIXEL_ID

Update a Universal Pixel by ID:

PUT https://api.appnexus.com/universal-pixel/pixel?id=UNIVERSAL-PIXEL_ID

Delete a Universal Pixel by ID:

DELETE https://api.appnexus.com/universal-pixel/pixel?id=UNIVERSAL-PIXEL_ID

View a Universal Pixel by UUID:

GET https://api.appnexus.com/universal-pixel-uuid/pixel?uuid=UNIVERSAL-PIXEL_UUID


View a list of Universal Pixels

Query Fields

Field

Type

Description

member_id
integerID of a member associated with Universal Pixel for operation
advertiser_id
integerID of an advertiser associated with Universal Pixel
sort
string

Sort by field and direction:

  • ID ascending = id.asc
  • ID descending = id.dsc

Default = id.asc

num_elements
integerNumber of elements to return; maximum = 1000, minimum = 1, default = 1000
start_element
integerStarting element (used for paging);default = 0


JSON Fields (Response Body)

Field

Type

Description

data
arrayArray of Universal Pixel objects
id
integerUniversal Pixel ID assigned by the API
name
stringName of the Universal Pixel
uuid
stringUnique ID for the Universal Pixel assigned by the API
member_id
integerID of member associated with Universal Pixel
advertiser_id
integerID of advertiser associated with Universal Pixel
created_on
stringTimestamp the Universal Pixel was created. Format: YYYY-MM-DD HH:MM:SS e.g., 2019-03-08 15:34:18
last_updatedstringTimestamp when the Universal Pixel was last updated. Format: YYYY-MM-DD HH:MM:SS e.g., 2019-03-08 15:34:18


Create a new Universal Pixel

Query Fields

Field

Type

Description

member_id
integerID of a member associated with Universal Pixel for operation


JSON Fields (Request Body)

Field

Type

Description

namestringName of the Universal Pixel . Minimum length of string is 1 and maximum is 100.
advertiser_idintegerID of advertiser associated with Universal Pixel


JSON Fields (Response Body)

Field

Type

Description

id
integerUniversal Pixel ID assigned by the API
name
stringName of the Universal Pixel
uuid
stringUnique ID for the Universal Pixel assigned by the API
member_id
integerID of member associated with Universal Pixel
advertiser_id
integerID of advertiser associated with Universal Pixel
created_on
stringTimestamp the Universal Pixel was created. Format: YYYY-MM-DD HH:MM:SS e.g., 2019-03-08 15:34:18
last_updatedstringTimestamp when the Universal Pixel was last updated. Format: YYYY-MM-DD HH:MM:SS e.g., 2019-03-08 15:34:18


View a Universal Pixel by ID

Query Fields

Field

Type

Description

id
integerID for the Universal Pixel assigned by the API for operation


JSON Fields (Response Body)

Field

Type

Description

id
integerUniversal Pixel ID assigned by the API for operation
name
stringName of the Universal Pixel
uuid
stringUnique ID for the Universal Pixel assigned by the API
member_id
integerID of member associated with Universal Pixel
advertiser_id
integerID of advertiser associated with Universal Pixel
created_on
stringTimestamp the Universal Pixel was created. Format: YYYY-MM-DD HH:MM:SS e.g., 2019-03-08 15:34:18
last_updated
stringTimestamp when the Universal Pixel was last updated. Format: YYYY-MM-DD HH:MM:SS e.g., 2019-03-08 15:34:18

Update a Universal Pixel by ID

Query Fields

Field

Type

Description

id
integerID for the Universal Pixel assigned by the API for operation

JSON Fields (Request Body)

Any field which needs to be changed from existing value to new one. For example,

Field

Type

Description

name
stringUpdated name of the Universal Pixel

Delete a Universal Pixel by ID

Query Fields

Field

Type

Description

id
integerID for the Universal Pixel assigned by the API which would be deleted


View a Universal Pixel by UUID

Query Fields

Field

Type

Description

uuid
integerUnique ID for the Universal Pixel assigned by the API for operation


JSON Fields (Response Body)

Field

Type

Description

id
integerUniversal Pixel ID assigned by the API for operation
name
stringName of the Universal Pixel
uuid
stringUnique ID for the Universal Pixel assigned by the API
member_id
integerID of member associated with Universal Pixel
advertiser_id
integerID of advertiser associated with Universal Pixel
created_on
stringTimestamp the Universal Pixel was created. Format: YYYY-MM-DD HH:MM:SS e.g., 2019-03-08 15:34:18
last_updated
stringTimestamp when the Universal Pixel was last updated. Format: YYYY-MM-DD HH:MM:SS e.g., 2019-03-08 15:34:18

Audience REST API

View a a list of audiences associated with a member or advertiser:

GET https://api.appnexus.com/universal-pixel/audience

Create a new audience:

POST https://api.appnexus.com/universal-pixel/audience

View an audience by ID:

GET https://api.appnexus.com/universal-pixel/audience?id=AUDIENCE_ID

Update an audience by ID:

PUT https://api.appnexus.com/audience?id=AUDIENCE_ID

Delete an audience by ID:

DELETE https://api.appnexus.com/audience?id=AUDIENCE_ID


View a list of Audiences

Query Fields

Field

Type

Description

member_id
integerID of a member associated with Universal Pixel for operation
advertiser_id
integerID of an advertiser associated with Universal Pixel
sort
string

Sort by field and direction:

  • ID ascending = id.asc
  • ID descending = id.dsc

Default = id.asc

num_elements
integerNumber of elements to return; maximum = 1000, minimum = 1, default = 1000
start_element
integerStarting element (used for paging); default = 0
universal_pixel_id
integerUniversal Pixel ID to filter by
segment_id
integer

Segment ID to filter by

search
stringSearch term


JSON Fields (Response Body)

Field

Type

Description

data
arrayArray of Audience objects
id
integerAudience ID assigned by the API
version_id
integerVersion ID associated with the audience
universal_pixel_id
integerID for the Universal Pixel to associate audience with
advertiser_id
integerID of advertiser associated with the Audience
name
stringName of the Audience
user_ttl_minutes
integerTTL (Time To Live) in minutes for a user in this audience; maximum = 259200, minimum = 0, default = 43200
segment_id
integerSegment ID to use to target this audience
rule
objectRule set for the audience
created_on
stringTimestamp when audience was created. Format: YYYY-MM-DD HH:MM:SS e.g., 2019-03-08 15:34:18
published_on
stringTimestamp when audience was published. Format: YYYY-MM-DD HH:MM:SS e.g., 2019-03-08 15:34:18

Create a new Audience

Query Fields

Field

Type

Description

member_id
integerID of a member associated with Audience for operation


JSON Fields (Request Body)

Field

Type

Description

name
stringName of the Audience .
universal_pixel_id
integerID for the Universal Pixel to associate audience with
user_ttl_minutes
integerTTL (Time To Live) in minutes for a user in this audience; maximum = 259200, minimum = 0, default = 43200
rule
objectRule for audience


JSON Fields (Response Body)

Field

Type

Description

id
integerAudience ID assigned by the API
version_id
integerVersion ID associated with the audience
universal_pixel_id
integerID for the Universal Pixel associated audience with
name
stringName of the Audience
segment_id
integerSegment ID to use to target this audience
user_ttl_minutes
integerTTL (Time To Live) in minutes for a user in this audience; maximum = 259200, minimum = 0, default = 43200
rule
objectRule created for the audience
created_on
stringTimestamp when audience was created. Format: YYYY-MM-DD HH:MM:SS e.g., 2019-03-08 15:34:18
published_on
stringTimestamp when audience was published. Format: YYYY-MM-DD HH:MM:SS e.g., 2019-03-08 15:34:18

View an Audience by ID

Query Fields

Field

Type

Description

id
integerID for the Audience assigned by the API


JSON Fields (Response Body)

Field

Type

Description

id
integerAudience ID assigned by the API
version_id
integerVersion ID associated with the audience
universal_pixel_id
integerID for the Universal Pixel to associate audience with
advertiser_id
integerID of advertiser associated with the Audience
name
stringName of the Audience
user_ttl_minutes
integerTTL (Time To Live) in minutes for a user in this audience; maximum = 259200, minimum = 0, default = 43200
segment_id
integerSegment ID to use to target this audience
rule
objectRule set for the audience
created_on
stringTimestamp when audience was created. Format: YYYY-MM-DD HH:MM:SS e.g., 2019-03-08 15:34:18
published_on
stringTimestamp when audience was published. Format: YYYY-MM-DD HH:MM:SS e.g., 2019-03-08 15:34:18

Update an Audience by ID

Query Fields

Field

Type

Description

id
integerID for the Audience assigned by the API


JSON Fields (Request Body)

Any field which needs to be changed from existing value to new one . For example,

Field

Type

Description

name
stringUpdated name of the Audience
ruleobjectUpdated rule for the Audience
user_ttl_minutesintegerTTL (Time To Live) in minutes for a user in this audience; maximum = 259200, minimum = 0, default = 43200


JSON Fields (Response Body)

Field

Type

Description

id
integerAudience ID assigned by the API
version_id
integerVersion ID associated with the audience
universal_pixel_id
integerID for the Universal Pixel to associate audience with
advertiser_id
integerID of advertiser associated with the Audience
name
stringName of the Audience
user_ttl_minutes
integerMinutes for this audience to exist; maximum = 259200, minimum = 0, default = 43200
segment_id
integerSegment ID to use to target this audience
rule
objectRule set for the audience
created_on
stringTimestamp when audience was created. Format: YYYY-MM-DD HH:MM:SS e.g., 2019-03-08 15:34:18
published_on
stringTimestamp when audience was published. Format: YYYY-MM-DD HH:MM:SS e.g., 2019-03-08 15:34:18

Delete an Audience by ID

Query Fields

Field

Type

Description

id
integerID for the Audience assigned by the API which would be deleted

Conversion REST API

View a list of conversions associated with a member or advertiser:

GET https://api.appnexus.com/universal-pixel/conversion

Create a new conversion:

POST https://api.appnexus.com/universal-pixel/conversion

View a conversion by ID:

GET https://api.appnexus.com/universal-pixel/conversion?id=CONVERSION_ID

Update a conversion by ID:

PUT https://api.appnexus.com/universal-pixel/conversion?id=CONVERSION_ID

Delete a conversion by ID:

DELETE https://api.appnexus.com/universal-pixel/conversion?id=CONVERSION_ID



View a list of Conversions

Query Fields

Field

Type

Description

member_id
integerID of a member associated with conversions for operation
advertiser_id
integerID of an advertiser associated with conversions
sort
string

Sort by field and direction:

  • ID ascending = id.asc
  • ID descending = id.dsc

Default = id.asc

num_elements
integerNumber of elements to return; maximum = 1000, minimum = 1, default = 1000
start_element
integerStarting element (used for paging). Default = 0
universal_pixel_id
integerUniversal Pixel ID to filter by
conversion_pixel_id
integerID of legacy conversion pixel
search
stringSearch term


JSON Fields (Response Body)

Field

Type

Description

data
arrayArray of conversion objects
id
integerConversion ID assigned by the API
universal_pixel_id
integerID for the Universal Pixel associated with this conversion
name
stringName of the conversion
conversion_pixel_id
integerID of legacy conversion pixel
conversion_category_id
integerID of the conversion event category
conversion_category_custom
stringLabel of the custom conversion event category
count_type
enumType of conversion count - view, click or hybrid
min_minutes_per_conversion
integer

The interval (in minutes) to allow a repeat conversion. Maximum value is 32767(22 days).

  • If set to 0: count all conversions
  • If set to null (default): Count one per user
post_click_value
numberThe value you attribute to a conversion after a click.
post_click_expire_minutes
numberThe interval (in minutes) from impression time allowed for a view conversion to be counted as eligible. Maximum value is 43200 (30 days).
If set to 0 or null, the maximum lookback window applies.
post_view_value
numberThe value you attribute to a conversion after a view.
post_view_expire_minutes
numberThe value you attribute to a conversion after a view.
rule
objectRules for conversion
created_on
stringTimestamp when audience was created. Format: YYYY-MM-DD HH:MM:SS e.g., 2019-03-08 15:34:18
published_on
stringTimestamp when audience was published. Format: YYYY-MM-DD HH:MM:SS e.g., 2019-03-08 15:34:18


Create a new Conversion

Query Fields

Field

Type

Description

member_id
integerID of a member associated with Conversion for operation


JSON Fields (Request Body)

Field

Type

Description

universal_pixel_id
integerID for the universal pixel with which this conversion is associated with
name
stringName of the conversion
conversion_category_id
integerID of conversion event category
conversion_category_custom
stringLabel of the custom conversion event category
count_type
enumType of conversion count - view, click or hybrid
min_minutes_per_conversion
integer

The interval (in minutes) to allow a repeat conversion. Maximum value is 32767(22 days).

  • If set to 0: count all conversions
  • If set to null (default): Count one per user
post_click_value
numberThe value you attribute to a conversion after a click.
post_click_expire_minutes
numberThe interval (in minutes) from impression time allowed for a view conversion to be counted as eligible. Maximum value is 43200 (30 days).
If set to 0 or null, the maximum lookback window applies.
post_view_value
numberThe value you attribute to a conversion after a view.
post_view_expire_minutes
numberThe value you attribute to a conversion after a view.
rule
objectRules for conversion


JSON Fields (Response Body)

Field

Type

Description

id
integerConversion ID assigned by the API
member_id
integerID of a member associated with conversions for operation
version_id
integerVersion for this conversion
universal_pixel_id
integerID for the Universal Pixel associated with this conversion
name
stringName of the conversion
conversion_pixel_id
integerID of legacy conversion pixel
conversion_category_id
integerID of the conversion event category
conversion_category_custom
stringLabel of the custom conversion event category
count_type
enumType of conversion count - view, click or hybrid
min_minutes_per_conversion
integer

The interval (in minutes) to allow a repeat conversion. Maximum value is 32767(22 days).

  • If set to 0: count all conversions
  • If set to null (default): Count one per user
post_click_value
numberThe value you attribute to a conversion after a click.
post_click_expire_minutes
numberThe interval (in minutes) from impression time allowed for a view conversion to be counted as eligible. Maximum value is 43200 (30 days).
If set to 0 or null, the maximum look-back window applies.
post_view_value
numberThe value you attribute to a conversion after a view.
post_view_expire_minutes
numberThe value you attribute to a conversion after a view.
rule
objectRules for conversion
created_on
stringTimestamp when audience was created. Format: YYYY-MM-DD HH:MM:SS e.g., 2019-03-08 15:34:18
published_on
stringTimestamp when audience was published. Format: YYYY-MM-DD HH:MM:SS e.g., 2019-03-08 15:34:18


View a Conversion by ID

Query Fields

Field

Type

Description

id
integerID for the Universal Pixel assigned by the API for operation


JSON Fields (Response Body)

Field

Type

Description

id
integerConversion ID assigned by the API
member_id
integerID of a member associated with conversions for operation
version_id
integerVersion for this conversion
universal_pixel_id
integerID for the Universal Pixel associated with this conversion
name
stringName of the conversion
conversion_pixel_id
integerID of legacy conversion pixel
conversion_category_id
integerID of the conversion event category
conversion_category_custom
stringLabel of the custom conversion event category
count_type
enumType of conversion count - view, click or hybrid
min_minutes_per_conversion
integer

The interval (in minutes) to allow a repeat conversion. Maximum value is 32767(22 days).

  • If set to 0: count all conversions
  • If set to null (default): Count one per user
post_click_value
numberThe value you attribute to a conversion after a click.
post_click_expire_minutes
numberThe interval (in minutes) from impression time allowed for a view conversion to be counted as eligible. Maximum value is 43200 (30 days).
If set to 0 or null, the maximum look-back window applies.
post_view_value
numberThe value you attribute to a conversion after a view.
post_view_expire_minutes
numberThe value you attribute to a conversion after a view.
rule
objectRules for conversion
created_on
stringTimestamp when audience was created. Format: YYYY-MM-DD HH:MM:SS e.g., 2019-03-08 15:34:18
published_on
stringTimestamp when audience was published. Format: YYYY-MM-DD HH:MM:SS e.g., 2019-03-08 15:34:18

Update a Conversion by ID

Query Fields

Field

Type

Description

id
integerID for the Conversion assigned by the API for operation

JSON Fields (Request Body)

Any field which needs to be changed from existing value to new one. For example,

Field

Type

Description

name
stringName of the conversion
conversion_category_id
integerID of the conversion event category
conversion_category_custom
stringLabel of the custom conversion event category
count_type
enumType of conversion count - view, click or hybrid
min_minutes_per_conversion
integer

The interval (in minutes) to allow a repeat conversion. Maximum value is 32767(22 days).

  • If set to 0: count all conversions
  • If set to null (default): Count one per user
post_click_value
numberThe value you attribute to a conversion after a click.
post_click_expire_minutes
numberThe interval (in minutes) from impression time allowed for a view conversion to be counted as eligible. Maximum value is 43200 (30 days).
If set to 0 or null, the maximum look-back window applies.
post_view_value
numberThe value you attribute to a conversion after a view.
post_view_expire_minutes
numberThe value you attribute to a conversion after a view.
rule
objectRules for conversion

JSON Fields (Response Body)

Field

Type

Description

id
integerConversion ID assigned by the API
member_id
integerID of a member associated with conversions for operation
version_id
integerVersion for this conversion
universal_pixel_id
integerID for the Universal Pixel associated with this conversion
name
stringName of the conversion
conversion_pixel_id
integerID of legacy conversion pixel
conversion_category_id
integerID of the conversion event category
conversion_category_custom
stringLabel of the custom conversion event category
count_type
enumType of conversion count - view, click or hybrid
min_minutes_per_conversion
integer

The interval (in minutes) to allow a repeat conversion. Maximum value is 32767(22 days).

  • If set to 0: count all conversions
  • If set to null (default): Count one per user
post_click_value
numberThe value you attribute to a conversion after a click.
post_click_expire_minutes
numberThe interval (in minutes) from impression time allowed for a view conversion to be counted as eligible. Maximum value is 43200 (30 days).
If set to 0 or null, the maximum look-back window applies.
post_view_value
numberThe value you attribute to a conversion after a view.
post_view_expire_minutes
numberThe value you attribute to a conversion after a view.
rule
objectRules for conversion
created_on
stringTimestamp when audience was created. Format: YYYY-MM-DD HH:MM:SS e.g., 2019-03-08 15:34:18
published_on
stringTimestamp when audience was published. Format: YYYY-MM-DD HH:MM:SS e.g., 2019-03-08 15:34:18

Delete a Conversion by ID

Query Fields

Field

Type

Description

id
integerID for the Universal Pixel assigned by the API which would be deleted

Examples

 Get a list of Universal Pixels

 Create a new Universal Pixel

 View a Universal Pixel by ID

 Update a Universal Pixel by ID

 View a Universal Pixel by UUID

 View a list of audiences associated with a member or advertiser

 Create a new audience

 View an audience by ID

 Update an audience by ID

 View a a list of conversions associated with a member or advertiser

 Create a new conversion

 View a conversion by ID

 Update a conversion by ID


  • No labels