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.



4808
4809
4810
# File 'lib/google/apis/content_v2_1/classes.rb', line 4808

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

Instance Attribute Details

#clicksFixnum

Number of clicks. Corresponds to the JSON property clicks

Returns:

  • (Fixnum)


4795
4796
4797
# File 'lib/google/apis/content_v2_1/classes.rb', line 4795

def clicks
  @clicks
end

#ctrFloat

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)


4801
4802
4803
# File 'lib/google/apis/content_v2_1/classes.rb', line 4801

def ctr
  @ctr
end

#impressionsFixnum

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

Returns:

  • (Fixnum)


4806
4807
4808
# File 'lib/google/apis/content_v2_1/classes.rb', line 4806

def impressions
  @impressions
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



4813
4814
4815
4816
4817
# File 'lib/google/apis/content_v2_1/classes.rb', line 4813

def update!(**args)
  @clicks = args[:clicks] if args.key?(:clicks)
  @ctr = args[:ctr] if args.key?(:ctr)
  @impressions = args[:impressions] if args.key?(:impressions)
end