Class: Google::Apis::AnalyticsdataV1beta::Metric
- Inherits:
-
Object
- Object
- Google::Apis::AnalyticsdataV1beta::Metric
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/analyticsdata_v1beta/classes.rb,
lib/google/apis/analyticsdata_v1beta/representations.rb,
lib/google/apis/analyticsdata_v1beta/representations.rb
Overview
The quantitative measurements of a report. For example, the metric eventCount
is the total number of events. Requests are allowed up to 10 metrics.
Instance Attribute Summary collapse
-
#expression ⇒ String
A mathematical expression for derived metrics.
-
#invisible ⇒ Boolean
(also: #invisible?)
Indicates if a metric is invisible in the report response.
-
#name ⇒ String
The name of the metric.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Metric
constructor
A new instance of Metric.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ Metric
Returns a new instance of Metric.
1038 1039 1040 |
# File 'lib/google/apis/analyticsdata_v1beta/classes.rb', line 1038 def initialize(**args) update!(**args) end |
Instance Attribute Details
#expression ⇒ String
A mathematical expression for derived metrics. For example, the metric Event
count per user is eventCount/totalUsers.
Corresponds to the JSON property expression
1010 1011 1012 |
# File 'lib/google/apis/analyticsdata_v1beta/classes.rb', line 1010 def expression @expression end |
#invisible ⇒ Boolean Also known as: invisible?
Indicates if a metric is invisible in the report response. If a metric is
invisible, the metric will not produce a column in the response, but can be
used in metricFilter, orderBys, or a metric expression.
Corresponds to the JSON property invisible
1017 1018 1019 |
# File 'lib/google/apis/analyticsdata_v1beta/classes.rb', line 1017 def invisible @invisible end |
#name ⇒ String
The name of the metric. See the API Metrics for the list of
metric names supported by core reporting methods such as runReport and
batchRunReports. See Realtime Metrics for the
list of metric names supported by the runRealtimeReport method. See Funnel
Metrics for the list of metric names supported by the
runFunnelReport method. If expression is specified, name can be any
string that you would like within the allowed character set. For example if
expression is screenPageViews/sessions, you could call that metric's name =
viewsPerSession. Metric names that you choose must match the regular
expression ^[a-zA-Z0-9_]$. Metrics are referenced by name in metricFilter
, orderBys, and metric expression.
Corresponds to the JSON property name
1036 1037 1038 |
# File 'lib/google/apis/analyticsdata_v1beta/classes.rb', line 1036 def name @name end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1043 1044 1045 1046 1047 |
# File 'lib/google/apis/analyticsdata_v1beta/classes.rb', line 1043 def update!(**args) @expression = args[:expression] if args.key?(:expression) @invisible = args[:invisible] if args.key?(:invisible) @name = args[:name] if args.key?(:name) end |