---
title: "Returns GA4 report preview"
method: POST
path: "/googleanalytics4/report/preview"
tags: ["Google analytics 4 reports"]
---

# Returns GA4 report preview

`POST /googleanalytics4/report/preview`

## Request

- The document declares no server URL.
- Auth: API key in header `TWN-InstanceKey` and API key in header `TWN-Authentication`

## Query parameters

- `limit` integer
- `offset` integer
- `searchTerm` string

## Request body

- Ga4ReportCreateApiModel: Model for creating a new GA4 report configuration.
  - `Name` string: Name of the report.
  - `PropertyName` string: Name of the GA4 property. Something like properties/123456.
  - `MetricNames` string[]: API names of the metrics to include in the report.
  - `Filters` Ga4ReportFilterApiModel[]: Filters to apply to the report.
    - `DimensionName` string: API name of the dimension to filter on.
    - `Value` string: Value the dimension must match.
    - `DisplayName` string, nullable: User friendly display name of the filter dimension.
  - `NrOfDaysBack` integer: Number of days back the report data covers.
  - `MappingDimensionName` string: API name of the dimension used for mapping report rows to products.
  - `MappingAttributeId` integer: Identifier of the attribute used for mapping report rows to products.
  - `RegexTemplate` string, nullable: Optional regex template applied to dimension values during mapping.

## Response `200`

OK

- Ga4ReportDataApiModel: Contains the data returned by a GA4 report.
  - `DimensionHeader` string: Header label for the dimension column.
  - `MetricHeaders` string[]: Header labels for the metric columns.
  - `TotalRows` integer: Total number of rows available in the report.
  - `Rows` Ga4ReportDataItemApiModel[]: Rows of report data.
    - `DimensionValue` string: Value of the dimension for this row.
    - `MetricValues` string[]: Metric values for this row, in the same order as the metric headers.
    - `ArticleNumbers` string[]: Article numbers mapped to the dimension value of this row.

## Other responses

- `400`: Bad Request

---

[API](https://skmtc.dev/tweakwise/apis/app-api.md) - [All operations](https://skmtc.dev/tweakwise/apis/app-api/llms.txt) - [OpenAPI document](https://skmtc.dev/tweakwise/apis/app-api/revisions/dc936bf76941?raw)
