# Google Analytics Admin V1alpha Client - Class AudienceDimensionOrMetricFilter (0.32.0)

0.32.0 (latest) 0.31.3 0.30.0 0.29.1 0.28.1 0.27.0 0.26.0 0.25.2 0.24.2 0.23.0 0.22.5 0.20.0 0.19.0 0.18.1 0.17.0 0.16.0 0.15.1 0.14.0 0.13.0 0.12.0 0.11.1 0.10.0 0.9.0 0.8.2

> [!WARNING]
> **Beta**
>
>
> This library is covered by the [Pre-GA Offerings Terms](https://docs.cloud.google.com/terms/service-terms#1)
> of the Terms of Service. Pre-GA libraries might have limited support,
> and changes to pre-GA libraries might not be compatible with other pre-GA versions.
> For more information, see the
> [launch stage descriptions](https://docs.cloud.google.com/products#product-launch-stages).

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** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ string_filter` | `https://docs.cloud.google.com/php/docs/reference/analytics-admin/latest/V1alpha.AudienceDimensionOrMetricFilter.StringFilter` A filter for a string-type dimension that matches a particular pattern. |
| `↳ in_list_filter` | `https://docs.cloud.google.com/php/docs/reference/analytics-admin/latest/V1alpha.AudienceDimensionOrMetricFilter.InListFilter` A filter for a string dimension that matches a particular list of options. |
| `↳ numeric_filter` | `https://docs.cloud.google.com/php/docs/reference/analytics-admin/latest/V1alpha.AudienceDimensionOrMetricFilter.NumericFilter` A filter for numeric or date values on a dimension or metric. |
| `↳ between_filter` | `https://docs.cloud.google.com/php/docs/reference/analytics-admin/latest/V1alpha.AudienceDimensionOrMetricFilter.BetweenFilter` A filter for numeric or date values between certain values on a dimension or metric. |
| `↳ field_name` | `string` 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](https://developers.google.com/analytics/devguides/reporting/data/v1/api-schema#custom_dimensions). |
| `↳ at_any_point_in_time` | `bool` 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_period` | `int` 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** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/analytics-admin/latest/V1alpha.AudienceDimensionOrMetricFilter.StringFilter|null` |   |

### hasStringFilter

### setStringFilter

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

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/analytics-admin/latest/V1alpha.AudienceDimensionOrMetricFilter.StringFilter` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getInListFilter

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/analytics-admin/latest/V1alpha.AudienceDimensionOrMetricFilter.InListFilter|null` |   |

### hasInListFilter

### setInListFilter

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

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/analytics-admin/latest/V1alpha.AudienceDimensionOrMetricFilter.InListFilter` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getNumericFilter

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/analytics-admin/latest/V1alpha.AudienceDimensionOrMetricFilter.NumericFilter|null` |   |

### hasNumericFilter

### setNumericFilter

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

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/analytics-admin/latest/V1alpha.AudienceDimensionOrMetricFilter.NumericFilter` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getBetweenFilter

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/analytics-admin/latest/V1alpha.AudienceDimensionOrMetricFilter.BetweenFilter|null` |   |

### hasBetweenFilter

### setBetweenFilter

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

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/analytics-admin/latest/V1alpha.AudienceDimensionOrMetricFilter.BetweenFilter` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$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](https://developers.google.com/analytics/devguides/reporting/data/v1/api-schema#custom_dimensions).

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `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](https://developers.google.com/analytics/devguides/reporting/data/v1/api-schema#custom_dimensions).

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$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** ||
|---|---|
| **Type** | **Description** |
| `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** ||
|---|---|
| **Name** | **Description** |
| `var` | `bool` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$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** ||
|---|---|
| **Type** | **Description** |
| `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** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getOneFilter

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |