Skip to end of metadata
Go to start of metadata

Conversion Pixel Service

The Pixel Service can be used to create conversion pixels to place on advertiser pages to track both view and click-based conversions.

Once you have a conversion pixel ID, the basic format of an image conversion pixel is <img src="https://ib.adnxs.com/px?id=37&t=2" width="1" height="1" />. Learn more about Conversion pixels here (customer login required).

Segment pixels are created separately via the Segment Service.

On This Page

REST API

View all conversion pixels:

View an array of specific conversion pixels:

View all conversion pixels for one of your advertisers:

View a particular conversion pixel for one of your advertisers:

Add a new conversion pixel to one of your advertisers:

Modify an existing conversion pixel:

Delete an existing conversion pixel:

You cannot delete a pixel that is used by one or more line items. You must edit the line item to remove the conversion pixel first.

Find out which fields you can filter and sort by: 

JSON Fields

Field

Type

Description

Default

Required On

id

int

The internal ID associated with the pixel.

 

PUT, in querystring

code

string

The custom code for the pixel.

 

 

name

string

The name of the pixel.

 

POST

state

enum

The state of the pixel. Possible values: "active" or "inactive".

 

 

campaigns

array

Read-only. The campaigns with which the pixel is associated. See Campaigns below for details about the fields in this array.

 

 

line_items

array

Read-only. The line items with which the pixel is associated. See Line Items below for details about the fields in this array.

 

 

trigger_type

enum 

The type of event required for a valid (attributed) conversion. Possible values: view, click, or hybrid.

click

 

min_minutes_per_conv

int

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

null

 

post_view_expire_mins

int

The 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_click_expire_mins

int

The interval (in minutes) from impression time allowed for a click conversion to be counted as eligible. Maximum value is 129600 (90 days). If set to 0 or null, the maximum lookback window applies.

 

 

post_click_value

double

The value you attribute to a conversion after a click.

 

 

post_view_value

double

The value you attribute to a conversion after a view.

 

 

piggyback_pixels

array of objects

The URLs of the pixels you want us to fire when the conversion pixel fires. See Piggyback Pixels below for details.

 

 

created_on

timestamp

Read-only. The date and time when the pixel was created.

 

 

last_modified

timestamp

Read-only. The date and time when the pixel was last modified.

 

 

advertiser_id

int

The ID of the advertiser that owns the pixel.

 

POST, in querystring

pixel_conversion_event_idenum

Optional. The ID of the conversion event associated with the pixel. Setting an event category will not effect our optimization algorithms immediately. Instead, it provides our optimization team with valuable data for prediction that we can then start to test and incorporate. If you don't see a good match for your type of conversion event, leave this field blank.

Possible values are:

  • null - No category selected.
  • 2 - Visit landing page - A user visits your website after being served an ad.
  • 3 - Item view - A user visits a page on your website that displays one or more products or services.
  • 4 - Add to cart - A user adds one or more of your products or services to their shopping cart.
  • 5 - Initiate checkout - A user begins the checkout process.
  • 6 - Add payment info - A user adds payment information, such as a credit card number, during the checkout process.
  • 7 - Purchase - A confirmed sale of your product or service.
  • 8- Generate lead - Collect lead information, such as email addresses or zip codes, from people interested in your business.
  
pixel_conversion_eventarrayRead-only. The pixel conversion event category with which the pixel is associated. See Pixel Conversion Event below for details.  

Campaigns

This array shows you the campaign associations. To associate a pixel to a campaign, use the Campaign Service.

Field

Type

Description

id

string

Read-only. The ID of the campaign.

Line Items

This array shows you the line item associations. To associate a pixel to a line itme, use the Line Item Service.

Field

Type

Description

id

string

Read-only. The ID of the line item.

name

string

Read-only. The name of the line item.

state

enum

Read-only. The state of the line item. Possible values: "active" or "inactive".

Piggyback Pixels

Each object in the piggyback_pixels array contains the following fields.

When adding piggyback pixels, please keep the following in mind:

  • Image pixels can only piggyback off other other image pixels, and JavaScript pixels can only piggyback other JavaScript pixels.
  • Image pixels can only have one piggyback pixel. If you need to piggyback multiple pixels, be sure to use a JavaScript pixel.
  • There are no character limits to piggybacked pixels in AppNexus, but browser/server URL limits may apply.

Field

Type (length)

Description

url

string (255)

The URL of the pixel to piggyback.

pixel_type

enum

The type of the pixel to piggyback. Possible values: "js" or "img".

Pixel Conversion Event

Field

Type

Description

id

enum

Read-only. The ID of the conversion event optionally associated with this pixel. Possible values are integers between 2 and 8, which are associated with the name values below.

  • null - no category selected.
  • 2 - LandingPage - A user visits your website after being served an ad.
  • 3 - ItemView - A user visits a page on your website that displays one or more products or services.
  • 4 - AddToCart - A user adds one or more of your products or services to their shopping cart.
  • 5 - InitiateCheckout - A user begins the checkout process.
  • 6 - AddPaymentInfo - A user adds payment information, such as a credit card number, during the checkout process.
  • 7 - Purchase - A confirmed sale of your product or service.
  • 8 - Lead - Collect lead information, such as email addresses or zip codes, from people interested in your business.
nameenum

Read-only. The name of the conversion event optionally associated with this pixel. Possible values are associated with the id values above:

  • null - no category selected.
  • 2 - LandingPage - A user visits your website after being served an ad.
  • 3 - ItemView - A user visits a page on your website that displays one or more products or services.
  • 4 - AddToCart - A user adds one or more of your products or services to their shopping cart.
  • - InitiateCheckout - A user begins the checkout process.
  • 6 - AddPaymentInfo - A user adds payment information, such as a credit card number, during the checkout process.
  • 7 - Purchase - A confirmed sale of your product or service.
  • 8 - Lead - Collect lead information, such as email addresses or zip codes, from people interested in your business.

Examples

Add a conversion pixel for advertiser 2
View conversion pixel 17 for advertiser 2
View conversion pixels for all advertisers
Add a conversion event category to a pixel