- [JSON representation](https://developers.google.com/ad-manager/api/beta/reference/rest/v1/Goal.md.txt#SCHEMA_REPRESENTATION)
- [GoalType](https://developers.google.com/ad-manager/api/beta/reference/rest/v1/Goal.md.txt#GoalType)
- [UnitType](https://developers.google.com/ad-manager/api/beta/reference/rest/v1/Goal.md.txt#UnitType)

Defines the criteria a `LineItem` needs to satisfy to meet its delivery goal.

| JSON representation |
|---|
| ``` { "goalType": enum (`GoalType`), "unitType": enum (`UnitType`), "units": string } ``` |

| Fields ||
|---|---|
| `goalType` | ``enum (`GoalType`)`` The type of the goal for the LineItem. It defines the period over which the goal should be reached. |
| `unitType` | ``enum (`UnitType`)`` The type of the goal unit for the LineItem. |
| `units` | `string (int64 format)` If this is a primary goal, it represents the number or percentage of impressions or clicks that will be reserved. If the line item is of type `LineItemTypeEnum.LineItemType.SPONSORSHIP`, it represents the percentage of available impressions reserved. If the line item is of type `LineItemTypeEnum.LineItemType.BULK` or `LineItemTypeEnum.LineItemType.PRICE_PRIORITY`, it represents the number of remaining impressions reserved. If the line item is of type `LineItemTypeEnum.LineItemType.NETWORK` or `LineItemTypeEnum.LineItemType.HOUSE`, it represents the percentage of remaining impressions reserved. If this is an impression cap goal, it represents the number of impressions or conversions that the line item will stop serving at if reached. For valid line item types, see \[LineItem.impressionsCap\]\[LineItem.impressions_cap\]. |

## GoalType

Specifies the type of the goal for a LineItem.

| Enums ||
|---|---|
| `GOAL_TYPE_UNSPECIFIED` | Default value. This value is unused. |
| `NONE` | No goal is specified for the number of ads delivered. The line item `lineItemType` must be one of: - `LineItemTypeEnum.LineItemType.PRICE_PRIORITY` - `LineItemTypeEnum.LineItemType.AD_EXCHANGE` - `LineItemTypeEnum.LineItemType.CLICK_TRACKING` |
| `LIFETIME` | There is a goal on the number of ads delivered for this line item during its entire lifetime. The line item `lineItemType` must be one of: - `LineItemTypeEnum.LineItemType.STANDARD` - `LineItemTypeEnum.LineItemType.BULK` - `LineItemTypeEnum.LineItemType.PRICE_PRIORITY` - `LineItemTypeEnum.LineItemType.ADSENSE` - `LineItemTypeEnum.LineItemType.AD_EXCHANGE` - \[LineItemTypeEnum.LineItemType.ADMOB\]\[\] - `LineItemTypeEnum.LineItemType.CLICK_TRACKING` |
| `DAILY` | There is a daily goal on the number of ads delivered for this line item. The line item `lineItemType` must be one of: - `LineItemTypeEnum.LineItemType.SPONSORSHIP` - `LineItemTypeEnum.LineItemType.NETWORK` - `LineItemTypeEnum.LineItemType.PRICE_PRIORITY` - `LineItemTypeEnum.LineItemType.HOUSE` - `LineItemTypeEnum.LineItemType.ADSENSE` - `LineItemTypeEnum.LineItemType.AD_EXCHANGE` - \[LineItemTypeEnum.LineItemType.ADMOB\]\[\] - `LineItemTypeEnum.LineItemType.BUMPER` |

## UnitType

Indicates the type of unit used for defining a reservation. The `LineItem.costType` can differ from the UnitType - an ad can have an impression goal, but be billed by its click. Usually CostType and UnitType will refer to the same unit.

| Enums ||
|---|---|
| `UNIT_TYPE_UNSPECIFIED` | Default value. This value is unused. |
| `IMPRESSIONS` | The number of impressions served by creatives associated with the line item. |
| `CLICKS` | The number of clicks reported by creatives associated with the line item. The line item `lineItemType` must be one of: - `LineItemTypeEnum.LineItemType.STANDARD` - `LineItemTypeEnum.LineItemType.BULK` - `LineItemTypeEnum.LineItemType.PRICE_PRIORITY` |
| `CLICK_THROUGH_CPA_CONVERSIONS` | The number of click-through Cost-Per-Action (CPA) conversions from creatives associated with the line item. This is only supported as secondary goal and the `LineItem.costType` must be \[CostTypeEnum.CostType.CPA\]\[\]. |
| `VIEW_THROUGH_CPA_CONVERSIONS` | The number of view-through Cost-Per-Action (CPA) conversions from creatives associated with the line item. This is only supported as secondary goal and the `LineItem.costType` must be \[CostTypeEnum.CostType.CPA\]\[\]. |
| `TOTAL_CPA_CONVERSIONS` | The number of total Cost-Per-Action (CPA) conversions from creatives associated with the line item. This is only supported as secondary goal and the `LineItem.costType` must be \[CostTypeEnum.CostType.CPA\]\[\]. |
| `VIEWABLE_IMPRESSIONS` | The number of viewable impressions reported by creatives associated with the line item. The `LineItem.lineItemType` must be `LineItemTypeEnum.LineItemType.STANDARD`. |
| `IN_TARGET_IMPRESSIONS` | The number of in-target impressions reported by third party measurements. The `LineItem.lineItemType` must be `LineItemTypeEnum.LineItemType.STANDARD`. |
| `COMPLETED_VIEWS` | The number of completed views reported by creatives associated with the line item. A completed view is defined as having watched the entirety of the in-stream video ad and is only supported for standard reservation video line items. The `LineItem.lineItemType` must be `LineItemTypeEnum.LineItemType.STANDARD`. |