## Request Logs

Request logs contain data representing the root level fields sent in the ad decision request.

| Name                    | Description                                                                                      | Sample Data                                       | Type                      |
|-------------------------|--------------------------------------------------------------------------------------------------|---------------------------------------------------|---------------------------|
| Id                      | The unique Request ID.                                                                          | 55cc44928bd94f4a9 c18b8a4edac2365                   | string                    |
| BlockedAdvertiserIds   |                                                                                                  |                                                   | array Link                |
| BlockedCampaignIds     |                                                                                                  |                                                   | array Link                |
| BlockedCreativeIds     |                                                                                                  |                                                   | array Link                |
| BlockedFlights         |                                                                                                  |                                                   | array Link                |
| Datacenter              |                                                                                                  |                                                   | boolean                   |
| DeliveryMode           | 1 = Web (served by ados.js tags) 2 = Email (served by HTML tags) 3 = API (served by REST call) 4 = Static Tracking Link (served by GIF). | 3                                                 | int                       |
| Device                 |                                                                                                  |                                                   | object - see other        |
| EnableBotFiltering      | Indicated whether or not the request was bot filtered against IAB bots/spiders list.            |                                                   | boolean                   |
| EnableUserDBIP         | Indicates whether or not we store the IP in UserDB.                                            |                                                   | boolean                   |
| GdprComputed            | Given all gdpr variables/vendor lookups etc, whether the request qualifies as consenting.        | TRUE                                              | boolean                   |
| GdprIsEu               | Boolean indicating whether request's origin country is EU.                                       |                                                   | boolean                   |
| GdprRaw                | Boolean passed in for consent.                                                                    |                                                   | boolean                   |
| Gdprsource             | Source of consent. '+' separated string of values: 'blk', 'req', 'udb', 'req' example: 'req+udb'. |                                                   | string                    |
| HostName               |                                                                                                  | “e-10322.adzerk.net“                              | string                    |
| IncludePricingData     | Indicates whether pricing data was requested.                                                   |                                                   | boolean                   |
| IsValidUA              | If true, the request passed the bots and spiders filter.                                         | TRUE                                              | boolean                   |
| Keywords                | Keywords defining the request made.                                                              | Quick Links:<br>- [Request Logs](d               | array Links:              |
| Location.City          | An array of location data from the ad request.                                                  | Sydney                                            | string                    |
| Location.CountryCode   | see above.                                                                                       | AU                                                | string                    |
| Location.CountryName   | see above.                                                                                       | Australia                                         | string                    |
| Location.Latitude      | see above.                                                                                       | 0                                                 | int                       |
| Location.Longitude     | see above.                                                                                       | 0                                                 | int                       |
| Location.DmaCode       | see above.                                                                                       |                                                   | int                       |
| Location.MetroCode     | see above.                                                                                       |                                                   | int                       |
| Location.PostalCode    | see above.                                                                                       | 2000                                              | string                    |
| Location.Region        | see above.                                                                                       | NSW                                              | string                    |
| Meta:schema            | The type of log - will always be event.                                                         | event                                             | string                    |
| Meta:version           | The version of the log format this log object uses.                                             | 1                                                 | string                    |
| NetworkId              | The network ID from the request.                                                                 | 10322                                            | int                       |
| Properties             | Custom properties set by the user on the request. only appears if not empty.                   | "Properties": {"key": "value"}             | string                    |
| Protocol               | Protocol of this request.                                                                        |                                                   | string                    |
| ReferrerUrl            | Referrer url if request.referrer is set.                                                        |                                                   | string                    |
| RequestCount           | Number of items requested to be returned for this request.                                      | 1                                                 | int                       |
| Timestamp              | Time of the request, as milliseconds since UNIX epoch.                                          | 1581038415077                                    | long                      |
| Url                    | URL if request.url is set.                                                                        |                                                   | string                    |
| Segments               | Override Segments passed with the User object on the ADR. Absent if no segments present on the ADR. | [134,5555]                                      | array                     |
| User.IsNew            | An array of user data (in UserDB) associated with the request. Contains two fields: the Key, and whether or not this is a new user. Sourced from the request. | TRUE                                             | boolean                   |
| User.Key              | See above.                                                                                      | ue1-708a3d9146d7438 b85a8cc6686e9a0e8            | string                    |
| User.Segments         | All segments the user belongs to at the time of the ad decision request (ADR).                  | [134,5555]                                      | array                     |

## Decision Logs

The ad serving engine makes a **decision** from the request as to which ad (if any) to return in the response. Every **placement** sent in the request will receive its own decision, so one request could generate ten decisions if there are ten placements.

Decision logs contain a JSON object for each decision.

| Name                    | Description                                                                                      | Sample Data                                       | Type                      |
|-------------------------|--------------------------------------------------------------------------------------------------|---------------------------------------------------|---------------------------|
| Id                      | The decision ID.                                                                                | "8f4f8ce4c48041ebb abe267bc619a644"              | string                    |
| AdId                   | The ad ID if it was passed in the placement.                                                   | 1234567                                           | int                       |
| AdQuery                | Dynamic fields based on which attributes are included in adQuery object in ad decision requests.|                                                   | JSON                      |
| AdTypes                | The ad types from the placement.                                                                | Qui                                               | array Link                |
| CampaignId             | The campaign ID if it was passed in the placement.                                             |                                                   | int                       |
| ClickUrl               | The ClickUrl if passed in the placement.                                                       |                                                   | string                    |
| ContentKeys            | A map of key/value pairs used for ContentDB if passed in the placement.                        |                                                   | object                    |
| Count                   | The number of ads to return per placement if passed in the placement.                          |                                                   | int                       |
| DecisionCount          | Number of decisions per object. DecisionCount can be summed to receive a total.                  | 1                                                 | int                       |
| DivName                | The name of the div from the placement.                                                         | "div1"                                           | string                    |
| EventIds               | Event IDs if passed in the placement.                                                           |                                                   | array                     |
| FlightId               | The flight ID if it was passed in the placement.                                              |                                                   | int                       |
| FloorCPC              | Floor CPC if passed in the placement.                                                           |                                                   | float                     |
| FloorPrice             | Floor price if passed in the placement.                                                          |                                                   | float                     |
| Meta:version           | The decision ID.                                                                                | "1.0"                                           | string                    |
| Meta:schema            | The type of log - will always be decision.                                                      | "decision"                                      | string                    |
| NetworkId              | The network ID from the request.                                                                  | 1234                                             | int                       |
| Overrides               | An object that overrides values for an advertiser, campaign, flight or ad, if passed in the placement. |                                                   | object                    |
| Properties             | A map of key/value pairs used to pass custom properties in the placement.                       |                                                   | object                    |
| Proportionality        | If a multi-winner placement used the proportionality setting.                                   |                                                   | boolean                   |
| RequestId              | The ID of the decision's request.                                                                | "a6dca0abf19e4b41a4ac 679b9328907b"              | string                    |
| SiteId                 | The site ID from the placement.                                                                  |                                                   | int                       |
| Timestamp              | Time of the decision, as milliseconds since UNIX epoch.                                          | 1541173272293                                    | long                      |
| ZoneIds                | The zone ID(s) if they were passed in the placement.                                           |                                                   | array                     |
| PassbackAdIds         | RTB related                                                                                     |                                                   | string                    |
| SelectedAdIds         | Ad IDs selected for this placement.                                                              |                                                   | string                    |
| RtbAdIds               | RTB related                                                                                     |                                                   | string                    |
| BidRequestAdIds       | RTB related                                                                                     |                                                   | string                    |
| EventMultiplier        | RTB related                                                                                     |                                                   | int                       |
| MatchedBidRequestAdIds | RTB related                                                                                     |                                                   | string                    |

## Selection Logs

Selection logs contain information about the ad which was actually selected.

Note: If no ad was selected for a given decision, a Selection log will not be created.

| Name                    | Description                                                                                      | Sample Data                                       | Type                      |
|-------------------------|--------------------------------------------------------------------------------------------------|---------------------------------------------------|---------------------------|
| AdTypeId               | The numeric ID of an ad size. Sourced from the event shim.                                     | 162                                               | int                       |
| AuctionBids            | The number of non-RTB ads competing for the impression in an Auction priority.                 | 78                                                | int                       |
| BrandId                | The numeric ID of the impression's advertiser.                                                 | 554125                                           | int                       |
| BurnIn                 | True if in initial/learning phase                                                               |                                                   | boolean                   |
| CampaignId             | The numeric ID of the impression's campaign.                                                   | 1331048                                          | int                       |
| Categories             | The numeric ID of the impression's advertiser.                                                 | []                                                | array                     |
| ChannelId              | The numeric ID of the impression's channel.                                                    | 40304                                            | int                       |
| CreatedOn              | A time/date stamp (milliseconds since UNIX epoch) that indicates when the impression happened. | "/Date(1581038413783)/"                        | int (date)               |
| CreativeId             | The numeric ID of the impression's creative.                                                  | 16458736                                         | int                       |
| CreativeMetadata       | The creative metadata and/or creative template values of the selection if they are set on the creative. | {"customData": {"example": {"keyName": true}}, "ctTemplateVariable": "foo"} | object                    |
| CreativePassId        | The numeric ID of the impression's ad (creative mapped to flight).                            | 19126348                                         | int                       |
| Datacenter              | If true, the event originates from a TAG known datacenter.                                     | FALSE                                             | boolean                   |
| DecisionId             | Decision ID associated with this selection.                                                    | “7fb50ca376064d9ba50005e24535f4c9”                | string                    |
| DecisionIdx            | Decision Index. If the Decision generates only one Selection (i.e. it does not originate from a multi-winner placement) then the DecisionIdx will always be 0. | 0                                                | int                       |
| DeliveryMode           | 1 = Web (served by ados.js tags) 2 = Email (served by HTML tags) 3 = API (served by REST call) 4 = Static Tracking Link (served by GIF). | 3                                                | int                       |
| Device.advertisedOs    | Device details from browser UserAgent                                                           |                                                   | string                    |
| Device.advertisedOsMajorVersion | Device details from browser UserAgent                                                   |                                                   | int                       |
| Device.advertisedOsMinorVersion | Device details from browser UserAgent                                                   |                                                   | int                       |
| Device.advertisedOsRawVersion | Device details from browser UserAgent                                                      |                                                   | string                    |
| Device.brandName       | Device details from browser UserAgent                                                           |                                                   | string                    |
| Device.browser          | Device details from browser UserAgent                                                           |                                                   | string                    |
| Device.browserMajorVersion | Device details from browser UserAgent                                                        |                                                   | int                       |
| Device.browserMinorVersion | Device details from browser UserAgent                                                        |                                                   | int                       |
| Device.browserRawVersion | Device details from browser UserAgent                                                         |                                                   | string                    |
| Device.deviceIdentified | Device details from browser UserAgent                                                           |                                                   | boolean                   |
| Device.formFactor      | Device details from browser UserAgent                                                           |                                                   | string                    |
| Device.modelName       | Device details from browser UserAgent                                                           |                                                   | string                    |
| Device.osMajorVersion  | Device details from browser UserAgent                                                           |                                                   | int                       |
| Device.osMinorVersion  | Device details from browser UserAgent                                                           |                                                   | int                       |
| Device.osRawVersion    | Device details from browser UserAgent                                                           |                                                   | string                    |
| Ecpm                   | Calculated ECPM of the impression/click/event.                                                | 830.070956                                        | float                     |
| EcpmPartition          | Value pased in during decision request.                                                         |                                                   | string                    |
| FirstChannelId         | Deprecated                                                                                       |                                                   | int                       |
| FrequencyCap           | The type(s) of frequency capping applied to the impression.                                     |                                                   | int                       |
| GeoMatchedPoints       | Only included when using GeoDistance targeting. List of GeoDistance targets.                   |                                                   |                           |
| GdprComputed           | If true, the request has GDPR consent (from the request itself, from a UserDB record, etc.).  | TRUE                                              | boolean                   |
| GdprConsentRequired     | If true, the gdprConsentRequired parameter was provided on the request.                       | FALSE                                             | boolean                   |
| GdprConsentString      | The IAB consent string provided with the request if the string was used when computing GDPR consent. | ""                                              | string                    |
| GdprSource             | Where GDPR consent data (`true` or `false`) originates:  "none" - no consent  "request" - on the ad request  "userdb" - on the user record  "both" - both user record and request  "str" - from an IAB consent string + allowed vendor ID | "none"           | string                    |
| Gmv                    | Gross Merchandise Value. Sourced from the event URL if appended as a query parameter.         |                                                   | int                       |
| Id                     | The unique Selection ID.                                                                         | "71f5686388df4fd99fb f43b96eeb4946"             | string                    |
| IsNoTrack              | If true, the impression was served to a Do Not Track enabled user (boolean).                  | FALSE                                             | boolean                   |
| IsPublisherPayourExempt | Deprecated                                                                                      |                                                   | boolean                   |
| IsRemainder            | If true, the impression was served as part of the "Remainder Percentage" in an auction priority. IsRemainder is only logged when true. | FALSE                                             | boolean                   |
| IsTrackingCookieEvents  | If true, the impression is tracking conversions.                                               | FALSE                                             | boolean                   |
| IsValidUA             | If true, the impression passed the bots and spiders filter (boolean).                          | TRUE                                              | boolean                   |
| Keywords               | Keyword(s) sent on the request, converted into a comma separated string.                       | "fpfdvrmwggl4z,j7sr2y wlddf6m,dt7zi5mlfrrs7, kr74uowfsyyzp" | string (comma delimited) |
| Location.CountryCode   | An array of location data from the request. Sourced from the ad request, NOT the event shim.   | "AU"                                            | string                    |
| Location.CountryName   | See above.                                                                                       | "Australia"                                     | string                    |
| Location.Region        | See above.                                                                                       | "NSW"                                           | string                    |
| Location.City          | See above.                                                                                       | "Sydney"                                        | string                    |
| Location.DmaCode       | See above.                                                                                       |                                                   | int                       |
| Location.MetroCode     | See above.                                                                                       |                                                   | int                       |
| Location.PostalCode    | See above.                                                                                       | "2000"                                          | string                    |
| Location.Latitude      | See above.                                                                                       | 0                                                 | int                       |
| Location.Longitude     | See above.                                                                                       | 0                                                 | int                       |
| MatchingKeywords       | Keyword(s) present in the ad. Sourced from the event shim.                                     | Quick Links:<br>- [Request Logs](doc:be         | array Links:              |
| Meta:schema            | The type of log - will always be event.                                                         | "event"                                        | string                    |
| Meta:version           | The version of the log format this log object uses.                                             | "1.3"                                          | string                    |
| NetworkId              | The numeric ID of the selection's network. Sourced from the event shim.                        | 10322                                            | int                       |
| OptimizedPrice         | The price set by a bid optimizer (as in ROAS targeting) and is distinct from the initial price |                                                   | int                       |
| PassId                 | The numeric ID of the selection's flight.                                                      | 11082877                                         | int                       |
| PhantomCreativePassId  | Deprecated                                                                                       |                                                   | int                       |
| PhantomPassId          | Deprecated                                                                                       |                                                   | int                       |
| PlacementName          | The name of the Placement object or `<div>` that served the ad.                                | "placement 5"                                   | string                    |
| Price                  | The price per unit (CPA, CPM, CPC etc.) associated with the impression. Returned as a string. | "6.01"                                         | string                    |
| PriorityId             | The numeric ID of the selection's priority.                                                   | 161492                                           | int                       |
| RateType               | The rate used by the flight. Sourced from the event shim: · 1 - Flat · 2 = CPM · 3 = CPC · 4 = CPA View · 5 = CPA Click · 6 = CPA Both | 3    | int                       |
| RelevancyScore        |                                                                                                  | 500                                              | int                       |
| RemoteIP               | Due to GDPR regulation, this is sanitized as 0.0.0.0 instead of the IP address.                | "0.0.0.0"                                       | string                    |
| Revenue                | Revenue generated via the impression. Calculated by taking the revenue field in the event shim and multiplying by 1,000,000. | 0       |                          |
| revenueMultiplier       | Kevel Internal: Set to 1000000                                                                    | int                                                |
| SelectionCount         | The number of selections. This is always 1                                                      | int                                                |
| ServedBy              |                                                                                                  | "i-0ecaf52dd4dba2672"                            | string                    |
| ServedByAsg           |                                                                                                  | "bifrost-adservers-default-us-east-1"           | string                    |
| ServedByPid           |                                                                                                  | 43473                                            | int                       |
| SiteId                | The numeric ID of the impression's site. Sourced from the event shim.                         | 1086974                                         | int                       |
| TimeZoneId            | Timezone of the flight ie.                                                                       | "UTC"                                          | string                    |
| User.IsNew            | An array of user data (in UserDB) associated with the impression. Contains two fields: the Key, and whether or not this is a new user. Sourced from either the UserDB record or the user's cookie. | FALSE  | boolean                   |
| User.Type             | Kevel Internal                                                                                   |                                                   | int                       |
| User.Key              | See above.                                                                                       | "ue1-3542a229b8be4109b cad892fc317ddfa"        | string                    |
| UserKey               | The user Key (used by UserDB) associated with the impression. Sourced from the ad request.     | "ue1-3542a229b8be4109b cad892fc317ddfa"        | string                    |
| ZoneId                | The numeric ID of the impression's zone (if applicable). Sourced from the event shim.          | 0                                               | int                       |
| MatchedSegmentIds      | Segment IDs that successfully matched between: User segments (from ADR or UserDB) and Ad targeting rules. | [134,5555]                                  | array                     |

## UserDB Logs

UserDB logs contain JSON objects that represent an activity involving user records— adding custom interests, setting interests, setting GDPR consent, etc. UserDB logs are not shipped by default. You will need to have UserDB enabled, data shipping enabled, AND request the beta logs via a support ticket.

| Key                     | Description                                                                                     |
|-------------------------|-------------------------------------------------------------------------------------------------| 
| `Action`                | The UserDB action logged. See table below.                                                    |
| `BrandId`              | The ID of a retargeted advertiser, set by the /rt endpoint.                                     |
| `Custom:[key]`         | Custom JSON values set by /custom endpoint.                                                    |
| `Consent`              | GDPR consent string set by /consent endpoint.                                                 |
| `Interest`              | Interest, set by /interest endpoint converted into a comma separated string.                    |
| `IP`                   | User's IP address, set by the /ip endpoint.                                                    |
| `Meta:version`         | The version of the log format this log object uses.                                            |
| `Meta:schema`          | The type of log - will always be `userdb`.                                                     |
| `NetworkId`            | Your account's network ID.                                                                      |
| `PartnerId`            | RTB partner ID set by /sync endpoint.                                                           |
| `PartnerKey`           | Partner key that was set by /sync endpoint.                                                    |
| `Property:[key]`       | Any properties passed as a query string on the endpoint, as `?property:foo=bar`.              |
| `SegmentId`            | The ID of a retargeting segment, set by the /rt endpoint.                                      |
| `Timestamp`            | Time of the action, as milliseconds since UNIX epoch.                                          |
| `UserKey`              | The UserDB ID (also known as "user key") of the user.                                         |

Example UserDB log/set endpoint

```json
{
  "Meta:schema": "userdb",
  "Meta:version": "1.0",
  "NetworkId": 1234,
  "UserKey": "newKey",
  "Timestamp": 1540920521404,
  "Action": "cookie"
}
```
