Skip to navigation

The Pixalate tag and macros

How the Pixalate tag carries impression data, which parameters to fill, and how to map and test your ad server macros.

The Pixalate tag (a JavaScript tag or a 1x1 pixel) sends data about each impression to Pixalate as key-value parameters in its URL query string. Each parameter has a placeholder such as [ADVERTISER_ID]. A macro is your ad server’s placeholder for a value type. When you put your ad server’s macro in place of Pixalate’s placeholder, the ad server inserts the real value each time the ad is served.

The tag supports both GET and POST requests.

Video (2 min): map your ad server’s macros and test that they expand.

Map your macros

During onboarding, your Customer Success representative gives you a macro mapping form for each ad platform you’ll use.

  1. For each Pixalate parameter in the form, enter the matching macro from your ad server.
  2. Submit the form to Pixalate for review.
  3. When the macros are final, Pixalate generates your tags with the macros already inserted for each parameter.

The parameter reference below lists what each parameter is for and whether it’s required.

If you don’t pass the values marked as required, Pixalate may not be able to detect some types of invalid traffic.

Test your macros

Before you go live, check that your macros expand to real values. These two examples use the advertiser ID and device ID parameters. The same steps work for any parameter.

Advertiser ID

  1. In the tag URL (1x1 pixel or JavaScript), find the advertiser ID parameter avid=. It’s followed by the placeholder [ADVERTISER_ID].
  2. Replace [ADVERTISER_ID] with your ad server’s advertiser ID macro. For example, if the macro is {advertiserId}, the URL now contains avid={advertiserId}.
  3. Traffic the tag in your ad server inside a test campaign or creative.
  4. Open a browser, start the browser’s developer tools or a proxy such as Charles Proxy, and load the test page or tag.
  5. In the developer tools or proxy, search for Pixalate’s pixel URL. Pixalate gives you this URL during integration.
  6. In the URL’s query string, confirm that avid= is followed by a real advertiser ID (such as avid=28374), not the macro.

Device ID

  1. In the tag URL, find the device ID parameter kv19=. It’s followed by the placeholder [DEVICE_ID].
  2. Replace [DEVICE_ID] with your ad server’s device ID macro. For example, if the macro is {deviceId}, the URL now contains kv19={deviceId}.
  3. Traffic the tag in your ad server inside a test campaign or creative.
  4. Open the test app, start the webview’s developer tools (Chrome or Safari) or a proxy such as Charles Proxy, and load the test ad.
  5. Search for Pixalate’s pixel URL.
  6. Confirm that kv19= is followed by a real device ID (such as kv19=00000000-0000-4000-8000-000000000000), not the macro.

Parameter reference

The Dashboard name column shows where a value appears in the Analytics dashboard. Values marked API only aren’t shown as a dashboard dimension. Where the key is listed, it’s the parameter name in the tag. Pixalate sets the other keys in the tags it generates for you.

Publishers without an ad server

ParameterKeyDashboard nameWhat to passRequired?
Pixalate client IDclid—Your Pixalate client identifierHardcoded by Pixalate
Platform IDAd PlatformID of the platform or ad server the tags are implemented inHardcoded by Pixalate
Creative sizeAd Unit SizeWidth and height of the creative (width x height)Recommended (web, in-app). Required for viewability measurement.
User IPAPI onlyThe user’s IP address. Include client IPs from X-Forwarded-For.Required (web, in-app)
Auction ID or impression IDkv11API onlyA random, unique ID that identifies each impression. At least 16 characters; alphanumeric preferred.Required (web, in-app)
Placement IDSite PlacementID of the placement (ad slot or tag) on the page. Each placement on a page needs its own ID: a 300x250 above the fold and a 300x250 below the fold on the same page get different IDs.Required (web, in-app)
Supply typekv24Supply TypeThe type of supply generating the impression. See Supply types. Pass it dynamically or hardcode it.Required (web, in-app)
Device OSAPI onlyOperating system of the deviceRecommended (web, in-app)
User agentAPI onlyUser agent of the deviceRecommended (web, in-app)
Cachebuster—A unique alphanumeric value that stops the browser reusing a cached copy. You can use the IAB VAST 4.1 [CACHEBUSTING] macro where it’s supported.Required for the JavaScript tag
Page URLURLURL of the page the ad loaded onRequired for web (desktop and mobile web)
App ID or bundle IDkv18App IDThe app’s ID in its app store. For direct in-app integrations you can hardcode it. Examples: app ID 1207472156 (iOS and tvOS), bundle ID com.example.app (mobile and CTV).Required (in-app)
Device IDkv19API onlyThe device’s advertising identifier, such as IDFA, Google Advertising ID (AAID), Roku ID (RIDA) or Amazon Fire ID (AFAI)Required (in-app)

All integrations

All environments

ParameterKeyDashboard nameWhat to passRequired?
Pixalate client IDclid—Your Pixalate client identifierHardcoded by Pixalate
Platform IDAd PlatformID of the platform or ad server the tags are implemented inHardcoded by Pixalate
Advertiser ID *avidAdvertiserAd server ID of the top-level advertiser or demand partnerRecommended
Campaign ID *CampaignAd server ID of the campaign (a group of tags)Recommended
Creative ID *CreativeAd server ID of the individual demand-side creative or tagRecommended
Publisher ID *publisherIdPublisherAd server ID of the publisher organization that owns a group of websites. This can be the same as the seller ID if you work with the publisher directly.Recommended
Site ID *SiteAd server ID of the websiteRecommended
Line item ID *Line ItemAd server ID of the line itemRecommended
Seller ID *SellerAd server ID of the organization you buy the inventory through, such as an SSPRecommended
Bid priceBid PriceThe price offeredRecommended
Clear priceAPI onlyThe price the auction cleared atRecommended
Creative sizeAd Unit SizeWidth and height of the creative (width x height)Recommended
Page URLURLURL of the page the ad loaded onRequired for web (desktop and mobile web)
User IDAPI onlyAn ID for the user, such as a cookie ID. This is different from a device ID.Required
User IPAPI onlyThe user’s IP address. Include client IPs from X-Forwarded-For.Required
Auction ID or impression IDkv11API onlyA unique ID for each impression or request. Under IAB OpenRTB 2, the auction ID is a required, globally unique bid request attribute. You can use the IAB VAST 4.1 [TRANSACTIONID] macro where it’s supported. Minimum 16 characters; alphanumeric recommended.Required
Placement ID *Site PlacementID of the placement (ad slot or tag). Each placement on a page needs its own ID.Required
Customkv5API onlyReserved for custom values. Data passed in kv5 can be shown in the Analytics dashboard.—
Advertiser domain (adomain)API onlyThe domain of the advertiser’s landing pageRecommended
ISPAPI onlyName or ID of the internet service providerRecommended
Geographic regionAPI onlyCountry or region of the userRecommended
Supply typekv24Supply TypeSee Supply typesHardcoded by Pixalate, or passed by your macro
Device OSAPI onlyOperating system of the deviceRecommended
User agentAPI onlyUser agent of the device. You can use the IAB VAST 4.1 [DEVICEUA] macro where it’s supported.Recommended
Supply chain objectkv55API onlyThe serialized supply chain object. See Pass the Supply Chain Object.Recommended
Cachebuster—A unique alphanumeric value that stops the browser reusing a cached copy. You can use [CACHEBUSTING] where it’s supported.Recommended
SDK user ID—A unique user ID assigned by the SDKRecommended
IDFV—Identifier for Vendor: a unique ID shared by all apps from one developer on a deviceRecommended
Do not track—Whether the user turned on “do not track” on their device: 1 for true, 0 for falseRecommended

* IDs as represented in your ad server. Pass your ad server’s values so you can find and optimize against them in Pixalate’s data as they appear in your ad server.

Mobile and CTV environments

ParameterKeyDashboard nameWhat to passRequired?
LatitudeAPI onlyThe user’s latitude, if availableRequired
LongitudeAPI onlyThe user’s longitude, if availableRequired
App ID or bundle IDkv18, kv32App IDThe app’s ID in its app store. If your platform has a separate macro for the app ID, Pixalate uses kv32 for the app ID and keeps kv18 for the bundle ID. Examples: app ID 1207472156 (iOS and tvOS), bundle ID com.example.app (mobile and CTV).Required
Device IDkv19API onlyThe device’s advertising identifier, such as IDFA, AAID, RIDA or AFAI. You can pass it in one macro or several.Required
MRAID versionAPI onlyVersion of the MRAID API used to deliver the ad (mobile only)Recommended
Carrier IDAPI onlyID of the mobile carrierRecommended
App nameAPI onlyThe app’s name, separate from its app or bundle ID, as listed by the platform or ad serverRecommended
Device make or modelAPI onlyManufacturer or model of the deviceRecommended
SSAI integrationAPI onlyWhether the impression came from a server-side ad insertion (SSAI) integration: 0 for no, 1 for yesRecommended
App versionAPI onlyVersion of the app that fired the impressionRecommended for mobile

Video environments

ParameterKeyDashboard nameWhat to passRequired?
Video lengthAPI onlyDuration of the video adRecommended
Content IDAPI onlyID of the video contentRecommended
Video play statusVideo Play StatusThe player’s state, such as auto-play or click-to-playRequired, or hardcoded by Pixalate

How supply and demand IDs relate

Pixalate supports these ad server IDs. Passing them lets you line up Pixalate’s data with the data in your ad server.

Demand sideSupply side
Advertiser IDSeller ID
Campaign IDPublisher ID
Line item IDSite ID
Creative IDPlacement ID

Keep the hierarchy in mind when you map them, so the right ID goes in the right parameter:

  • Demand side: the advertiser is the top-level account. For example, an advertiser (advertiser ID) runs three brand campaigns (campaign IDs), and each campaign runs three creatives or tags (creative IDs).
  • Supply side: the seller is the top-level partner. For example, a seller (seller ID) works with 10 publishers (publisher IDs), each publisher owns 10 websites (site IDs), and every page on those sites has 3 ad slots (placement IDs).

Supply types (kv24)

The supply type tells Pixalate whether the placement is display, video or native, and whether it runs on desktop, mobile web, mobile app or CTV. Pass it in kv24.

Use a macro to fill it when the ad is served. If your platform has no macro for it, duplicate the tag for each supply type with the value hardcoded, and traffic each copy to the matching supply.

Accepted hardcoded values:

EnvironmentDisplayVideoNative
DesktopDesktopDesktop_VideoDesktop_Native
Mobile webMobile_WebMobile_Web_VideoMobile_Web_Native
Mobile appMobile_InAppMobile_InApp_VideoMobile_InApp_Native
CTV app—CTV_InApp_Video—
EmailEmail_DisplayEmail_Video—

Supported IAB VAST 4.1 macros

Pixalate supports these IAB VAST 4.1 standardized macros. Your video player fills them in at runtime. For definitions, see the IAB Tech Lab’s VAST 4.x macro list.

MacroTypeExample value
[ERRORCODE]integer12345678
[MEDIAPLAYHEAD] or [ADPLAYHEAD]timecodeEncoded: 00%3A05%3A21.123
[ASSETURI]stringEncoded: https%3A%2F%2Fmyadserver.com%2Fvideo.mp4
[VASTVERSIONS]array of integers2,3,5,6,7,8
[IFATYPE]stringrida
[IFA]UUID123e4567-e89b-12d3-a456-426655440000
[CLIENTUA]stringEncoded: MyPlayer%2F7.1%20MyPlayerVastPlugin%2F1.1.2
[SERVERUA]stringEncoded: AdsBot-Google%20(%2Bhttp%3A%2F%2Fwww.google.com%2Fadsbot.html)
[DEVICEUA]stringEncoded: Mozilla%2F5.0%20(X11%3B%20Linux%20x86_64)%20AppleWebKit%2F537.36%20(KHTML%2C%20like%20Gecko)%20Chrome%2F51.0.2704.103%20Safari%2F537.36
[DEVICEIP]stringIPv4: 192.0.2.10. IPv6, encoded: 2001%3Adb8%3A85a3%3A%3A8a2e%3A370%3A7334
[LATLONG]number,number51.004703,3.754806
[DOMAIN]stringwww.mydomain.com
[PAGEURL]stringEncoded: https%3A%2F%2Fwww.mydomain.com%2Farticle%2Fpage
[PLAYERSIZE]integer,integer640,360
[REGULATIONS]array of stringsgdpr
[ADTYPE]stringvideo
[TRANSACTIONID]UUID123e4567-e89b-12d3-a456-426655440000
[BREAKPOSITION]integer2
[APPNAME]stringcom.example.myapp
[PLACEMENTTYPE]integer1
[AUTOREFRESH]stringSelf-reported by publishers to mark activity from page- or site-level auto-refresh
[PLAYERSTATE]stringautoplayed,fullscreen

Pixalate also accepts two values that aren’t IAB macros: video play status (whether the video is auto-play or click-to-play) and purchased or acquired traffic (purchased, acquired). Map them like any other parameter.

Measure viewability for non-standard ad sizes

To measure viewability for ad sizes that aren’t IAB standard sizes, such as native ads, pass the ad placement’s div ID in the divid= parameter of the JavaScript tag. A 1x1 pixel can’t measure viewability. You can hardcode the value or pass it with a macro.

  • If the tag can’t find the div you pass, it falls back to its usual way of measuring viewability.
  • If you hardcode the div ID, make sure each non-standard placement’s tag has that placement’s own ID.
  • If every placement uses the same div ID, the tag only looks for that one div, and viewability results can be misleading.

Traffic the tag on a test page first and send it to Pixalate for QA before you push it to production.

Pass the Supply Chain Object (kv55)

You can pass the IAB Supply Chain Object (SCO), serialized, in kv55. If kv55 isn’t already in the tag Pixalate gave you, add it:

kv55=[SupplyChainObject]

These examples use [PIXALATE_TAG_HOST] in place of the host. Use the host in the tag Pixalate gave you.

JavaScript tag with kv55:

<script type="text/javascript" src="https://[PIXALATE_TAG_HOST]/s/[CLIENT_ID]/aa.js?cb=[CACHEBUSTER]#[CLIENT_ID];paid=[PARTNER_ID];avid=[ADVERTISER_ID];publisherId=[PUBLISHER_ID];kv55=[SupplyChainObject];kv24=[SUPPLY_TYPE]"></script>

1x1 pixel with kv55:

https://[PIXALATE_TAG_HOST]/i?clid=[CLIENT_ID]&paid=[PARTNER_ID]&avid=[ADVERTISER_ID]&publisherId=[PUBLISHER_ID]&kv55=[SupplyChainObject]&kv24=[SUPPLY_TYPE]

Serialization format

Replace [SupplyChainObject] with the serialized object, built the way the IAB describes for SupplyChain in non-OpenRTB requests:

  1. Start with the object’s two properties, version and complete, separated by a comma: ver,complete.
  2. Add each node, in order. Separate the properties from the first node, and each node from the next, with an exclamation mark (!).
  3. Within a node, list the properties in this order, separated by commas: asi,sid,hp,rid,name,domain,ext.

The last node should be your own. If it isn’t already in the serialized value, add it before you pass the value in kv55.

Example

This supply chain has two hops:

"schain": {
"ver": "1.0",
"complete": 1,
"nodes": [
{
"asi": "exchange1.com",
"sid": "1234",
"hp": 1,
"rid": "bid-request-1",
"name": "publisher",
"domain": "publisher.com"
},
{
"asi": "exchange2.com",
"sid": "abcd",
"hp": 1,
"rid": "bid-request-2",
"name": "intermediary",
"domain": "intermediary.com"
}
]
}

Serialized:

1.0,1!exchange1.com,1234,1,bid-request-1,publisher,publisher.com!exchange2.com,abcd,1,bid-request-2,intermediary,intermediary.com

The IAB spec also says to URL-encode any value that contains a comma or an exclamation mark, so the separators stay unambiguous.

To check supply chains in your reports, see Supply chain (SCO) reports and SCO validation and verification.