Google Analytics Admin V1alpha Client - Class AudienceDimensionOrMetricFilter (0.26.0)

Reference documentation and code samples for the Google Analytics Admin V1alpha Client class AudienceDimensionOrMetricFilter.

A specific filter for a single dimension or metric.

Generated from protobuf message google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter

Namespace

Google \ Analytics \ Admin \ V1alpha

Methods

__construct

Constructor.

Parameters
NameDescription
dataarray

Optional. Data for populating the Message object.

↳ string_filterAudienceDimensionOrMetricFilter\StringFilter

A filter for a string-type dimension that matches a particular pattern.

↳ in_list_filterAudienceDimensionOrMetricFilter\InListFilter

A filter for a string dimension that matches a particular list of options.

↳ numeric_filterAudienceDimensionOrMetricFilter\NumericFilter

A filter for numeric or date values on a dimension or metric.

↳ between_filterAudienceDimensionOrMetricFilter\BetweenFilter

A filter for numeric or date values between certain values on a dimension or metric.

↳ field_namestring

Required. Immutable. The dimension name or metric name to filter. If the field name refers to a custom dimension or metric, a scope prefix will be added to the front of the custom dimensions or metric name. For more on scope prefixes or custom dimensions/metrics, reference the Google Analytics Data API documentation.

↳ at_any_point_in_timebool

Optional. Indicates whether this filter needs dynamic evaluation or not. If set to true, users join the Audience if they ever met the condition (static evaluation). If unset or set to false, user evaluation for an Audience is dynamic; users are added to an Audience when they meet the conditions and then removed when they no longer meet them. This can only be set when Audience scope is ACROSS_ALL_SESSIONS.

↳ in_any_n_day_periodint

Optional. If set, specifies the time window for which to evaluate data in number of days. If not set, then audience data is evaluated against lifetime data (For example, infinite time window). For example, if set to 1 day, only the current day's data is evaluated. The reference point is the current day when at_any_point_in_time is unset or false. It can only be set when Audience scope is ACROSS_ALL_SESSIONS and cannot be greater than 60 days.

getStringFilter

A filter for a string-type dimension that matches a particular pattern.

Returns
TypeDescription
AudienceDimensionOrMetricFilter\StringFilter|null

hasStringFilter

setStringFilter

A filter for a string-type dimension that matches a particular pattern.

Parameter
NameDescription
varAudienceDimensionOrMetricFilter\StringFilter
Returns
TypeDescription
$this

getInListFilter

A filter for a string dimension that matches a particular list of options.

Returns
TypeDescription
AudienceDimensionOrMetricFilter\InListFilter|null

hasInListFilter

setInListFilter

A filter for a string dimension that matches a particular list of options.

Parameter
NameDescription
varAudienceDimensionOrMetricFilter\InListFilter
Returns
TypeDescription
$this

getNumericFilter

A filter for numeric or date values on a dimension or metric.

Returns
TypeDescription
AudienceDimensionOrMetricFilter\NumericFilter|null

hasNumericFilter

setNumericFilter

A filter for numeric or date values on a dimension or metric.

Parameter
NameDescription
varAudienceDimensionOrMetricFilter\NumericFilter
Returns
TypeDescription
$this

getBetweenFilter

A filter for numeric or date values between certain values on a dimension or metric.

Returns
TypeDescription
AudienceDimensionOrMetricFilter\BetweenFilter|null

hasBetweenFilter

setBetweenFilter

A filter for numeric or date values between certain values on a dimension or metric.

Parameter
NameDescription
varAudienceDimensionOrMetricFilter\BetweenFilter
Returns
TypeDescription
$this

getFieldName

Required. Immutable. The dimension name or metric name to filter. If the field name refers to a custom dimension or metric, a scope prefix will be added to the front of the custom dimensions or metric name. For more on scope prefixes or custom dimensions/metrics, reference the Google Analytics Data API documentation.

Returns
TypeDescription
string

setFieldName

Required. Immutable. The dimension name or metric name to filter. If the field name refers to a custom dimension or metric, a scope prefix will be added to the front of the custom dimensions or metric name. For more on scope prefixes or custom dimensions/metrics, reference the Google Analytics Data API documentation.

Parameter
NameDescription
varstring
Returns
TypeDescription
$this

getAtAnyPointInTime

Optional. Indicates whether this filter needs dynamic evaluation or not. If set to true, users join the Audience if they ever met the condition (static evaluation). If unset or set to false, user evaluation for an Audience is dynamic; users are added to an Audience when they meet the conditions and then removed when they no longer meet them.

This can only be set when Audience scope is ACROSS_ALL_SESSIONS.

Returns
TypeDescription
bool

setAtAnyPointInTime

Optional. Indicates whether this filter needs dynamic evaluation or not. If set to true, users join the Audience if they ever met the condition (static evaluation). If unset or set to false, user evaluation for an Audience is dynamic; users are added to an Audience when they meet the conditions and then removed when they no longer meet them.

This can only be set when Audience scope is ACROSS_ALL_SESSIONS.

Parameter
NameDescription
varbool
Returns
TypeDescription
$this

getInAnyNDayPeriod

Optional. If set, specifies the time window for which to evaluate data in number of days. If not set, then audience data is evaluated against lifetime data (For example, infinite time window).

For example, if set to 1 day, only the current day's data is evaluated. The reference point is the current day when at_any_point_in_time is unset or false. It can only be set when Audience scope is ACROSS_ALL_SESSIONS and cannot be greater than 60 days.

Returns
TypeDescription
int

setInAnyNDayPeriod

Optional. If set, specifies the time window for which to evaluate data in number of days. If not set, then audience data is evaluated against lifetime data (For example, infinite time window).

For example, if set to 1 day, only the current day's data is evaluated. The reference point is the current day when at_any_point_in_time is unset or false. It can only be set when Audience scope is ACROSS_ALL_SESSIONS and cannot be greater than 60 days.

Parameter
NameDescription
varint
Returns
TypeDescription
$this

getOneFilter

Returns
TypeDescription
string