How to Apply the AppNexus Macros

The encoded click tracking URL (only necessary for some third party adservers)

${AUCTION_ID}

The 64-bit character string representing the individual auction that led to the impression.

${TAG_ID}

The AppNexus TinyTag ID that originated the Bid Request

${ADV_CODE}

The code of the creative’s advertiser.

${CREATIVE_ID}

The creative ID that won the impression.

${ECP}

The publisher side Estimated Clear Price for the auction.

${INV_CLASS}

The inventory class (Class1, Class2, Class3, or Unaudited)

${RESERVE_PRICE}

The reserve price set by the publisher.

${SESSION_FREQ}

The session frequency for the user.

${AGE}

The age of the user (if available). Integer or 0.

${GENDER}

The gender of the user (if available). Values are ‘f’,’m’,’u’.

${CACHEBUSTER}

A random number string used to limit caching of the URL

${PRICE_PAID}

The price paid for this impression. (As opposed to the price bid, before price reduction.)

${REFERER_URL}

If available, the refering URL for this inventory.

${REFERER_URL_ENC}

The encoded refering URL.

${BID_PRICE}

The price bid for this impression, as opposed to the price paid after price reduction.

${TAG_CODE1}

Integration code set on the placement.

${TAG_CODE2}

Additional integration code set on the placement.

${INV_SOURCE_ID}

The ID for the inventory source to which this impression belongs.

${USER_ID}

The AppNexus 64-bit character string representing the user for the impression.

${USER_IP}

The IP address of the user.

${IS_PREVIEW}

If we are “previewing” the creative, we can pass a flag to the third-party server so they don’t count it as a production impression. If true, we pass a “1″; if false, we pass a “0″.

${SELLER_MEMBER_ID}

The member that owns the publisher where the impression originates from.

${SEG_IDS}

IDs of the segments belonging to the winning buyer in this user’s cookie (in order of last seen time). Note that this macro does not work for shared segments (such as those owned by a third party data provider).

${SEG_CODES}

Codes for the segments belonging to the winning buyer in this user’s cookie (in order of last seen time). Note that this macro does not work for shared segments (such as those owned by a third party data provider).

${DATACENTER}

Data center ID (1 = NYM, 2 = LAX, 3 = AMS)

${USER_CITY}

Character string of the user’s city

${USER_STATE}

Character string of the user’s state (2 letter abbreviation. FIPS 10-4 outside US and Canada)