# Google Analytics Data V1beta Client - Class SamplingMetadata (0.24.0)

0.24.0 (latest) 0.23.3 0.22.3 0.21.1 0.20.1 0.19.0 0.18.0 0.17.1 0.16.4 0.14.0 0.13.0 0.12.0 0.11.2 0.10.1 0.9.5

> [!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 Data V1beta Client class SamplingMetadata.

If this report results is
[sampled](https://support.google.com/analytics/answer/13331292), this
describes the percentage of events used in this report. Sampling is the
practice of analyzing a subset of all data in order to uncover the meaningful
information in the larger data set.

Generated from protobuf message `google.analytics.data.v1beta.SamplingMetadata`

## Namespace

Google \\ Analytics \\ Data \\ V1beta

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ samples_read_count` | `int|string` The total number of events read in this sampled report for a date range. This is the size of the subset this property's data that was analyzed in this report. |
| `↳ sampling_space_size` | `int|string` The total number of events present in this property's data that could have been analyzed in this report for a date range. Sampling uncovers the meaningful information about the larger data set, and this is the size of the larger data set. To calculate the percentage of available data that was used in this report, compute `samplesReadCount/samplingSpaceSize`. |

### getSamplesReadCount

The total number of events read in this sampled report for a date range.

This is the size of the subset this property's data that was analyzed in
this report.

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

### setSamplesReadCount

The total number of events read in this sampled report for a date range.

This is the size of the subset this property's data that was analyzed in
this report.

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

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

### getSamplingSpaceSize

The total number of events present in this property's data that could
have been analyzed in this report for a date range. Sampling
uncovers the meaningful information about the larger data set, and this
is the size of the larger data set.

To calculate the percentage of available data that was used in this
report, compute `samplesReadCount/samplingSpaceSize`.

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

### setSamplingSpaceSize

The total number of events present in this property's data that could
have been analyzed in this report for a date range. Sampling
uncovers the meaningful information about the larger data set, and this
is the size of the larger data set.

To calculate the percentage of available data that was used in this
report, compute `samplesReadCount/samplingSpaceSize`.

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

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