Class: Google::Apis::ContentV2_1::Metrics

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
lib/google/apis/content_v2_1/classes.rb,
lib/google/apis/content_v2_1/representations.rb,
lib/google/apis/content_v2_1/representations.rb

Overview

Performance metrics. Values are only set for metrics requested explicitly in the request's search query.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Metrics

Returns a new instance of Metrics.



5160
5161
5162
# File 'lib/google/apis/content_v2_1/classes.rb', line 5160

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#aosFloat

Average order size - the average number of items in an order. This metric cannot be segmented by product dimensions. Corresponds to the JSON property aos

Returns:

  • (Float)


5024
5025
5026
# File 'lib/google/apis/content_v2_1/classes.rb', line 5024

def aos
  @aos
end

#aov_microsFloat

Average order value - the average value (total price of items) of all placed orders. The currency of the returned value is stored in the currency_code segment. If this metric is selected, 'segments.currency_code' is automatically added to the SELECT clause in the search query (unless it is explicitly selected by the user) and the currency_code segment is populated in the response. This metric cannot be segmented by product dimensions. Corresponds to the JSON property aovMicros

Returns:

  • (Float)


5034
5035
5036
# File 'lib/google/apis/content_v2_1/classes.rb', line 5034

def aov_micros
  @aov_micros
end

#clicksFixnum

Number of clicks. Corresponds to the JSON property clicks

Returns:

  • (Fixnum)


5039
5040
5041
# File 'lib/google/apis/content_v2_1/classes.rb', line 5039

def clicks
  @clicks
end

#ctrFloat

Click-through rate - the number of clicks merchant's products receive (clicks) divided by the number of times the products are shown (impressions). Corresponds to the JSON property ctr

Returns:

  • (Float)


5045
5046
5047
# File 'lib/google/apis/content_v2_1/classes.rb', line 5045

def ctr
  @ctr
end

#days_to_shipFloat

Average number of days between an order being placed and the order being fully shipped, reported on the last shipment date. This metric cannot be segmented by product dimensions. Corresponds to the JSON property daysToShip

Returns:

  • (Float)


5052
5053
5054
# File 'lib/google/apis/content_v2_1/classes.rb', line 5052

def days_to_ship
  @days_to_ship
end

#impressionsFixnum

Number of times merchant's products are shown. Corresponds to the JSON property impressions

Returns:

  • (Fixnum)


5057
5058
5059
# File 'lib/google/apis/content_v2_1/classes.rb', line 5057

def impressions
  @impressions
end

#item_days_to_shipFloat

Average number of days between an item being ordered and the item being Corresponds to the JSON property itemDaysToShip

Returns:

  • (Float)


5062
5063
5064
# File 'lib/google/apis/content_v2_1/classes.rb', line 5062

def item_days_to_ship
  @item_days_to_ship
end

#item_fill_rateFloat

Percentage of shipped items in relation to all finalized items (shipped or rejected by the merchant; unshipped items are not taken into account), reported on the order date. Item fill rate is lowered by merchant rejections. Corresponds to the JSON property itemFillRate

Returns:

  • (Float)


5069
5070
5071
# File 'lib/google/apis/content_v2_1/classes.rb', line 5069

def item_fill_rate
  @item_fill_rate
end

#ordered_item_sales_microsFixnum

Total price of ordered items. Excludes shipping, taxes (US only), and customer cancellations that happened within 30 minutes of placing the order. The currency of the returned value is stored in the currency_code segment. If this metric is selected, 'segments.currency_code' is automatically added to the SELECT clause in the search query (unless it is explicitly selected by the user) and the currency_code segment is populated in the response. Corresponds to the JSON property orderedItemSalesMicros

Returns:

  • (Fixnum)


5079
5080
5081
# File 'lib/google/apis/content_v2_1/classes.rb', line 5079

def ordered_item_sales_micros
  @ordered_item_sales_micros
end

#ordered_itemsFixnum

Number of ordered items. Excludes customer cancellations that happened within 30 minutes of placing the order. Corresponds to the JSON property orderedItems

Returns:

  • (Fixnum)


5085
5086
5087
# File 'lib/google/apis/content_v2_1/classes.rb', line 5085

def ordered_items
  @ordered_items
end

#ordersFixnum

Number of placed orders. Excludes customer cancellations that happened within 30 minutes of placing the order. This metric cannot be segmented by product dimensions. Corresponds to the JSON property orders

Returns:

  • (Fixnum)


5092
5093
5094
# File 'lib/google/apis/content_v2_1/classes.rb', line 5092

def orders
  @orders
end

#rejected_itemsFixnum

Number of ordered items canceled by the merchant, reported on the order date. Corresponds to the JSON property rejectedItems

Returns:

  • (Fixnum)


5097
5098
5099
# File 'lib/google/apis/content_v2_1/classes.rb', line 5097

def rejected_items
  @rejected_items
end

#return_rateFloat

Total price of returned items divided by the total price of shipped items, reported on the order date. If this metric is selected, 'segments. currency_code' is automatically added to the SELECT clause in the search query (unless it is explicitly selected by the user) and the currency_code segment is populated in the response. Corresponds to the JSON property returnRate

Returns:

  • (Float)


5106
5107
5108
# File 'lib/google/apis/content_v2_1/classes.rb', line 5106

def return_rate
  @return_rate
end

#returned_itemsFixnum

Number of ordered items sent back for return, reported on the date when the merchant accepted the return. Corresponds to the JSON property returnedItems

Returns:

  • (Fixnum)


5112
5113
5114
# File 'lib/google/apis/content_v2_1/classes.rb', line 5112

def returned_items
  @returned_items
end

#returns_microsFixnum

Total price of ordered items sent back for return, reported on the date when the merchant accepted the return. The currency of the returned value is stored in the currency_code segment. If this metric is selected, 'segments. currency_code' is automatically added to the SELECT clause in the search query (unless it is explicitly selected by the user) and the currency_code segment is populated in the response. Corresponds to the JSON property returnsMicros

Returns:

  • (Fixnum)


5122
5123
5124
# File 'lib/google/apis/content_v2_1/classes.rb', line 5122

def returns_micros
  @returns_micros
end

#shipped_item_sales_microsFixnum

Total price of shipped items, reported on the order date. Excludes shipping and taxes (US only). The currency of the returned value is stored in the currency_code segment. If this metric is selected, 'segments.currency_code' is automatically added to the SELECT clause in the search query (unless it is explicitly selected by the user) and the currency_code segment is populated in the response. Corresponds to the JSON property shippedItemSalesMicros

Returns:

  • (Fixnum)


5132
5133
5134
# File 'lib/google/apis/content_v2_1/classes.rb', line 5132

def shipped_item_sales_micros
  @shipped_item_sales_micros
end

#shipped_itemsFixnum

Number of shipped items, reported on the shipment date. Corresponds to the JSON property shippedItems

Returns:

  • (Fixnum)


5137
5138
5139
# File 'lib/google/apis/content_v2_1/classes.rb', line 5137

def shipped_items
  @shipped_items
end

#shipped_ordersFixnum

Number of fully shipped orders, reported on the last shipment date. This metric cannot be segmented by product dimensions. Corresponds to the JSON property shippedOrders

Returns:

  • (Fixnum)


5143
5144
5145
# File 'lib/google/apis/content_v2_1/classes.rb', line 5143

def shipped_orders
  @shipped_orders
end

#unshipped_itemsFloat

Number of ordered items not shipped up until the end of the queried day. If a multi-day period is specified in the search query, the returned value is the average number of unshipped items over the days in the queried period. Corresponds to the JSON property unshippedItems

Returns:

  • (Float)


5150
5151
5152
# File 'lib/google/apis/content_v2_1/classes.rb', line 5150

def unshipped_items
  @unshipped_items
end

#unshipped_ordersFloat

Number of orders not shipped or partially shipped up until the end of the queried day. If a multi-day period is specified in the search query, the returned value is the average number of unshipped orders over the days in the queried period. This metric cannot be segmented by product dimensions. Corresponds to the JSON property unshippedOrders

Returns:

  • (Float)


5158
5159
5160
# File 'lib/google/apis/content_v2_1/classes.rb', line 5158

def unshipped_orders
  @unshipped_orders
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
# File 'lib/google/apis/content_v2_1/classes.rb', line 5165

def update!(**args)
  @aos = args[:aos] if args.key?(:aos)
  @aov_micros = args[:aov_micros] if args.key?(:aov_micros)
  @clicks = args[:clicks] if args.key?(:clicks)
  @ctr = args[:ctr] if args.key?(:ctr)
  @days_to_ship = args[:days_to_ship] if args.key?(:days_to_ship)
  @impressions = args[:impressions] if args.key?(:impressions)
  @item_days_to_ship = args[:item_days_to_ship] if args.key?(:item_days_to_ship)
  @item_fill_rate = args[:item_fill_rate] if args.key?(:item_fill_rate)
  @ordered_item_sales_micros = args[:ordered_item_sales_micros] if args.key?(:ordered_item_sales_micros)
  @ordered_items = args[:ordered_items] if args.key?(:ordered_items)
  @orders = args[:orders] if args.key?(:orders)
  @rejected_items = args[:rejected_items] if args.key?(:rejected_items)
  @return_rate = args[:return_rate] if args.key?(:return_rate)
  @returned_items = args[:returned_items] if args.key?(:returned_items)
  @returns_micros = args[:returns_micros] if args.key?(:returns_micros)
  @shipped_item_sales_micros = args[:shipped_item_sales_micros] if args.key?(:shipped_item_sales_micros)
  @shipped_items = args[:shipped_items] if args.key?(:shipped_items)
  @shipped_orders = args[:shipped_orders] if args.key?(:shipped_orders)
  @unshipped_items = args[:unshipped_items] if args.key?(:unshipped_items)
  @unshipped_orders = args[:unshipped_orders] if args.key?(:unshipped_orders)
end