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.



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

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

Instance Attribute Details

#clicksFixnum

Number of clicks. Corresponds to the JSON property clicks

Returns:

  • (Fixnum)


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

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)


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

def ctr
  @ctr
end

#impressionsFixnum

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

Returns:

  • (Fixnum)


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

def impressions
  @impressions
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



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

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