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.



4843
4844
4845
# File 'lib/google/apis/content_v2_1/classes.rb', line 4843

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

Instance Attribute Details

#clicksFixnum

Number of clicks. Corresponds to the JSON property clicks

Returns:

  • (Fixnum)


4830
4831
4832
# File 'lib/google/apis/content_v2_1/classes.rb', line 4830

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)


4836
4837
4838
# File 'lib/google/apis/content_v2_1/classes.rb', line 4836

def ctr
  @ctr
end

#impressionsFixnum

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

Returns:

  • (Fixnum)


4841
4842
4843
# File 'lib/google/apis/content_v2_1/classes.rb', line 4841

def impressions
  @impressions
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



4848
4849
4850
4851
4852
# File 'lib/google/apis/content_v2_1/classes.rb', line 4848

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