Google Ads Data Manager V1 Client - Class Item (0.5.0)

Reference documentation and code samples for the Google Ads Data Manager V1 Client class Item.

Represents an item in the cart associated with the event.

Generated from protobuf message google.ads.datamanager.v1.Item

Namespace

Google \ Ads \ DataManager \ V1

Methods

__construct

Constructor.

Parameters
Name
Description
data
array

Optional. Data for populating the Message object.

↳ merchant_product_id
string

Optional. The product ID within the Merchant Center account.

↳ quantity
int|string

Optional. The number of this item associated with the event.

↳ unit_price
float

Optional. The unit price excluding tax, shipping, and any transaction level discounts.

↳ item_id
string

Optional. A unique identifier to reference the item.

↳ additional_item_parameters
array< ItemParameter >

Optional. A bucket of any event parameters related to an item to be included within the event that were not already specified using other structured fields.

↳ merchant_id
string

Optional. The Merchant Center ID associated with the item. For Store Sales events this will override the value set at the cart level. This field is ignored for other events.

↳ merchant_feed_label
string

Optional. The feed label of the Merchant Center feed. If countries are still being used, the 2-letter country code in ISO-3166-1 alpha-2 can be used instead. For Store Sales events this will override the value set at the cart level. This field is ignored for other events.

↳ merchant_feed_language_code
string

Optional. The language code in ISO 639-1 associated with the Merchant Center feed where your items are uploaded.

↳ conversion_value
float

Optional. The conversion value associated with this item within the event, for cases where the conversion value is different for each item.

↳ custom_variables
array< ItemCustomVariable >

Optional. Additional key/value pair information to send to the conversion containers (conversion action or Floodlight activity), when tracking per-item conversions.

getMerchantProductId

Optional. The product ID within the Merchant Center account.

Returns
Type
Description
string

setMerchantProductId

Optional. The product ID within the Merchant Center account.

Parameter
Name
Description
var
string
Returns
Type
Description
$this

getQuantity

Optional. The number of this item associated with the event.

Returns
Type
Description
int|string

setQuantity

Optional. The number of this item associated with the event.

Parameter
Name
Description
var
int|string
Returns
Type
Description
$this

getUnitPrice

Optional. The unit price excluding tax, shipping, and any transaction level discounts.

Returns
Type
Description
float

setUnitPrice

Optional. The unit price excluding tax, shipping, and any transaction level discounts.

Parameter
Name
Description
var
float
Returns
Type
Description
$this

getItemId

Optional. A unique identifier to reference the item.

Returns
Type
Description
string

setItemId

Optional. A unique identifier to reference the item.

Parameter
Name
Description
var
string
Returns
Type
Description
$this

getAdditionalItemParameters

Optional. A bucket of any event parameters related to an item to be included within the event that were not already specified using other structured fields.

Returns
Type
Description

setAdditionalItemParameters

Optional. A bucket of any event parameters related to an item to be included within the event that were not already specified using other structured fields.

Parameter
Name
Description
var
array< ItemParameter >
Returns
Type
Description
$this

getMerchantId

Optional. The Merchant Center ID associated with the item. For Store Sales events this will override the value set at the cart level. This field is ignored for other events.

Returns
Type
Description
string

setMerchantId

Optional. The Merchant Center ID associated with the item. For Store Sales events this will override the value set at the cart level. This field is ignored for other events.

Parameter
Name
Description
var
string
Returns
Type
Description
$this

getMerchantFeedLabel

Optional. The feed label of the Merchant Center feed. If countries are still being used, the 2-letter country code in ISO-3166-1 alpha-2 can be used instead. For Store Sales events this will override the value set at the cart level. This field is ignored for other events.

Returns
Type
Description
string

setMerchantFeedLabel

Optional. The feed label of the Merchant Center feed. If countries are still being used, the 2-letter country code in ISO-3166-1 alpha-2 can be used instead. For Store Sales events this will override the value set at the cart level. This field is ignored for other events.

Parameter
Name
Description
var
string
Returns
Type
Description
$this

getMerchantFeedLanguageCode

Optional. The language code in ISO 639-1 associated with the Merchant Center feed where your items are uploaded.

Returns
Type
Description
string

setMerchantFeedLanguageCode

Optional. The language code in ISO 639-1 associated with the Merchant Center feed where your items are uploaded.

Parameter
Name
Description
var
string
Returns
Type
Description
$this

getConversionValue

Optional. The conversion value associated with this item within the event, for cases where the conversion value is different for each item.

Returns
Type
Description
float

hasConversionValue

clearConversionValue

setConversionValue

Optional. The conversion value associated with this item within the event, for cases where the conversion value is different for each item.

Parameter
Name
Description
var
float
Returns
Type
Description
$this

getCustomVariables

Optional. Additional key/value pair information to send to the conversion containers (conversion action or Floodlight activity), when tracking per-item conversions.

Returns
Type
Description

setCustomVariables

Optional. Additional key/value pair information to send to the conversion containers (conversion action or Floodlight activity), when tracking per-item conversions.

Parameter
Name
Description
var
Returns
Type
Description
$this
Create a Mobile Website
View Site in Mobile | Classic
Share by: