Reference documentation and code samples for the Google Analytics Data V1beta Client class Pivot.
Describes the visible dimension columns and rows in the report response.
Generated from protobuf messagegoogle.analytics.data.v1beta.Pivot
Namespace
Google \ Analytics \ Data \ V1beta
Methods
__construct
Constructor.
Parameters
Name
Description
data
array
Optional. Data for populating the Message object.
↳ field_names
array
Dimension names for visible columns in the report response. Including "dateRange" produces a date range column; for each row in the response, dimension values in the date range column will indicate the corresponding date range from the request.
Specifies how dimensions are ordered in the pivot. In the first Pivot, the OrderBys determine Row and PivotDimensionHeader ordering; in subsequent Pivots, the OrderBys determine only PivotDimensionHeader ordering. Dimensions specified in these OrderBys must be a subset of Pivot.field_names.
↳ offset
int|string
The row count of the start row. The first row is counted as row 0.
↳ limit
int|string
The number of unique combinations of dimension values to return in this pivot. Thelimitparameter is required. Alimitof 10,000 is common for single pivot requests. The product of thelimitfor eachpivotin aRunPivotReportRequestmust not exceed 250,000. For example, a two pivot request withlimit: 1000in each pivot will fail because the product is1,000,000.
↳ metric_aggregations
array
Aggregate the metrics by dimensions in this pivot using the specified metric_aggregations.
getFieldNames
Dimension names for visible columns in the report response. Including
"dateRange" produces a date range column; for each row in the response,
dimension values in the date range column will indicate the corresponding
date range from the request.
Dimension names for visible columns in the report response. Including
"dateRange" produces a date range column; for each row in the response,
dimension values in the date range column will indicate the corresponding
date range from the request.
Parameter
Name
Description
var
string[]
Returns
Type
Description
$this
getOrderBys
Specifies how dimensions are ordered in the pivot. In the first Pivot, the
OrderBys determine Row and PivotDimensionHeader ordering; in subsequent
Pivots, the OrderBys determine only PivotDimensionHeader ordering.
Dimensions specified in these OrderBys must be a subset of
Pivot.field_names.
Specifies how dimensions are ordered in the pivot. In the first Pivot, the
OrderBys determine Row and PivotDimensionHeader ordering; in subsequent
Pivots, the OrderBys determine only PivotDimensionHeader ordering.
Dimensions specified in these OrderBys must be a subset of
Pivot.field_names.
The row count of the start row. The first row is counted as row 0.
Returns
Type
Description
int|string
setOffset
The row count of the start row. The first row is counted as row 0.
Parameter
Name
Description
var
int|string
Returns
Type
Description
$this
getLimit
The number of unique combinations of dimension values to return in this
pivot. Thelimitparameter is required. Alimitof 10,000 is common for
single pivot requests.
The product of thelimitfor eachpivotin aRunPivotReportRequestmust not exceed 250,000. For example, a two pivot request withlimit:
1000in each pivot will fail because the product is1,000,000.
Returns
Type
Description
int|string
setLimit
The number of unique combinations of dimension values to return in this
pivot. Thelimitparameter is required. Alimitof 10,000 is common for
single pivot requests.
The product of thelimitfor eachpivotin aRunPivotReportRequestmust not exceed 250,000. For example, a two pivot request withlimit:
1000in each pivot will fail because the product is1,000,000.
Parameter
Name
Description
var
int|string
Returns
Type
Description
$this
getMetricAggregations
Aggregate the metrics by dimensions in this pivot using the specified
metric_aggregations.
[[["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 Pivot (0.22.3)\n\nVersion latestkeyboard_arrow_down\n\n- [0.22.3 (latest)](/php/docs/reference/analytics-data/latest/V1beta.Pivot)\n- [0.22.2](/php/docs/reference/analytics-data/0.22.2/V1beta.Pivot)\n- [0.21.1](/php/docs/reference/analytics-data/0.21.1/V1beta.Pivot)\n- [0.20.1](/php/docs/reference/analytics-data/0.20.1/V1beta.Pivot)\n- [0.19.0](/php/docs/reference/analytics-data/0.19.0/V1beta.Pivot)\n- [0.18.0](/php/docs/reference/analytics-data/0.18.0/V1beta.Pivot)\n- [0.17.1](/php/docs/reference/analytics-data/0.17.1/V1beta.Pivot)\n- [0.16.4](/php/docs/reference/analytics-data/0.16.4/V1beta.Pivot)\n- [0.14.0](/php/docs/reference/analytics-data/0.14.0/V1beta.Pivot)\n- [0.13.0](/php/docs/reference/analytics-data/0.13.0/V1beta.Pivot)\n- [0.12.0](/php/docs/reference/analytics-data/0.12.0/V1beta.Pivot)\n- [0.11.2](/php/docs/reference/analytics-data/0.11.2/V1beta.Pivot)\n- [0.10.1](/php/docs/reference/analytics-data/0.10.1/V1beta.Pivot)\n- [0.9.5](/php/docs/reference/analytics-data/0.9.5/V1beta.Pivot) \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 Pivot.\n\nDescribes the visible dimension columns and rows in the report response.\n\nGenerated from protobuf message `google.analytics.data.v1beta.Pivot`\n\nNamespace\n---------\n\nGoogle \\\\ Analytics \\\\ Data \\\\ V1beta\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getFieldNames\n\nDimension names for visible columns in the report response. Including\n\"dateRange\" produces a date range column; for each row in the response,\ndimension values in the date range column will indicate the corresponding\ndate range from the request.\n\n### setFieldNames\n\nDimension names for visible columns in the report response. Including\n\"dateRange\" produces a date range column; for each row in the response,\ndimension values in the date range column will indicate the corresponding\ndate range from the request.\n\n### getOrderBys\n\nSpecifies how dimensions are ordered in the pivot. In the first Pivot, the\nOrderBys determine Row and PivotDimensionHeader ordering; in subsequent\nPivots, the OrderBys determine only PivotDimensionHeader ordering.\n\nDimensions specified in these OrderBys must be a subset of\nPivot.field_names.\n\n### setOrderBys\n\nSpecifies how dimensions are ordered in the pivot. In the first Pivot, the\nOrderBys determine Row and PivotDimensionHeader ordering; in subsequent\nPivots, the OrderBys determine only PivotDimensionHeader ordering.\n\nDimensions specified in these OrderBys must be a subset of\nPivot.field_names.\n\n### getOffset\n\nThe row count of the start row. The first row is counted as row 0.\n\n### setOffset\n\nThe row count of the start row. The first row is counted as row 0.\n\n### getLimit\n\nThe number of unique combinations of dimension values to return in this\npivot. The `limit` parameter is required. A `limit` of 10,000 is common for\nsingle pivot requests.\n\nThe product of the `limit` for each `pivot` in a `RunPivotReportRequest`\nmust not exceed 250,000. For example, a two pivot request with `limit:\n1000` in each pivot will fail because the product is `1,000,000`.\n\n### setLimit\n\nThe number of unique combinations of dimension values to return in this\npivot. The `limit` parameter is required. A `limit` of 10,000 is common for\nsingle pivot requests.\n\nThe product of the `limit` for each `pivot` in a `RunPivotReportRequest`\nmust not exceed 250,000. For example, a two pivot request with `limit:\n1000` in each pivot will fail because the product is `1,000,000`.\n\n### getMetricAggregations\n\nAggregate the metrics by dimensions in this pivot using the specified\nmetric_aggregations.\n\n### setMetricAggregations\n\nAggregate the metrics by dimensions in this pivot using the specified\nmetric_aggregations."]]