如何获得lineitem赞助

时间:2018-01-04 07:20:19

标签: php google-dfp

如何获得订单项赞助价值,即每个订单项保留所有正在销售的展示次数的百分比?

我正在使用DFP PHP客户端库v201711。

1 个答案:

答案 0 :(得分:1)

您需要LineItemService.getLineItemsByStatement查询DFP API,然后检查primaryGoal属性。对于50%的赞助商项目,online DFP API query tool的情况如下:

{
  "primaryGoal": {
    "units": 50,
    "goalType": "DAILY",
    "unitType": "IMPRESSIONS"
  },
  "orderId": 548040886,
  "reserveAtCreation": false,
  "adExchangeAuctionOpeningPriority": 0,
  "isPrioritizedPreferredDealsEnabled": false,
  "startDateTimeType": "USE_START_DATE_TIME",
  "skipCrossSellingRuleWarningChecks": false,
  "costPerUnit": {
    "currencyCode": "RUB",
    "microAmount": 200000000
  },
  ...
}