Reference documentation and code samples for the Google Analytics Data V1beta Client class SamplingMetadata.
If this report results issampled, 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 messagegoogle.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, computesamplesReadCount/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, computesamplesReadCount/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, computesamplesReadCount/samplingSpaceSize.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Google Analytics Data V1beta Client - Class SamplingMetadata (0.22.3)\n\nVersion latestkeyboard_arrow_down\n\n- [0.22.3 (latest)](/php/docs/reference/analytics-data/latest/V1beta.SamplingMetadata)\n- [0.22.2](/php/docs/reference/analytics-data/0.22.2/V1beta.SamplingMetadata)\n- [0.21.1](/php/docs/reference/analytics-data/0.21.1/V1beta.SamplingMetadata)\n- [0.20.1](/php/docs/reference/analytics-data/0.20.1/V1beta.SamplingMetadata)\n- [0.19.0](/php/docs/reference/analytics-data/0.19.0/V1beta.SamplingMetadata)\n- [0.18.0](/php/docs/reference/analytics-data/0.18.0/V1beta.SamplingMetadata)\n- [0.17.1](/php/docs/reference/analytics-data/0.17.1/V1beta.SamplingMetadata)\n- [0.16.4](/php/docs/reference/analytics-data/0.16.4/V1beta.SamplingMetadata)\n- [0.14.0](/php/docs/reference/analytics-data/0.14.0/V1beta.SamplingMetadata)\n- [0.13.0](/php/docs/reference/analytics-data/0.13.0/V1beta.SamplingMetadata)\n- [0.12.0](/php/docs/reference/analytics-data/0.12.0/V1beta.SamplingMetadata)\n- [0.11.2](/php/docs/reference/analytics-data/0.11.2/V1beta.SamplingMetadata)\n- [0.10.1](/php/docs/reference/analytics-data/0.10.1/V1beta.SamplingMetadata)\n- [0.9.5](/php/docs/reference/analytics-data/0.9.5/V1beta.SamplingMetadata) \n| **Beta**\n|\n|\n| This library is covered by the [Pre-GA Offerings Terms](/terms/service-terms#1)\n| of the Terms of Service. Pre-GA libraries might have limited support,\n| and changes to pre-GA libraries might not be compatible with other pre-GA versions.\n| For more information, see the\n[launch stage descriptions](/products#product-launch-stages). \nReference documentation and code samples for the Google Analytics Data V1beta Client class SamplingMetadata.\n\nIf this report results is\n[sampled](https://support.google.com/analytics/answer/13331292), this\ndescribes the percentage of events used in this report. Sampling is the\npractice of analyzing a subset of all data in order to uncover the meaningful\ninformation in the larger data set.\n\nGenerated from protobuf message `google.analytics.data.v1beta.SamplingMetadata`\n\nNamespace\n---------\n\nGoogle \\\\ Analytics \\\\ Data \\\\ V1beta\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getSamplesReadCount\n\nThe total number of events read in this sampled report for a date range.\n\nThis is the size of the subset this property's data that was analyzed in\nthis report.\n\n### setSamplesReadCount\n\nThe total number of events read in this sampled report for a date range.\n\nThis is the size of the subset this property's data that was analyzed in\nthis report.\n\n### getSamplingSpaceSize\n\nThe total number of events present in this property's data that could\nhave been analyzed in this report for a date range. Sampling\nuncovers the meaningful information about the larger data set, and this\nis the size of the larger data set.\n\nTo calculate the percentage of available data that was used in this\nreport, compute `samplesReadCount/samplingSpaceSize`.\n\n### setSamplingSpaceSize\n\nThe total number of events present in this property's data that could\nhave been analyzed in this report for a date range. Sampling\nuncovers the meaningful information about the larger data set, and this\nis the size of the larger data set.\n\nTo calculate the percentage of available data that was used in this\nreport, compute `samplesReadCount/samplingSpaceSize`."]]