Report Option Examples

This section describes strategies for maximizing the performance for reports that are large in size (large number of rows) or expanse (long reporting period).

Overview

  • Timeframe and Granularity. Highly granular reports that cover long reporting periods (such as a year-to-date daily reports) are not supported in a single API call. If you require long reports that have a high-level of granularity, break up the report into several smaller reporting periods using multiple API calls.

Filter Options

The filterOptions array enables you to reduce the scope of your reports by identifying specific dimensions of data that are of interest. Dimensions may be be included in or exclude from reports.

The array comprises one or more Filter objects that consist of an includedValues object, an includedValues attribute, and a dimensionTypeId attribute. While the dimensionTypeId identifies dimension, the includedValues array identifies one or more dimension-value filters, and the isExcluded attribute determines whether the matching data is returned.

The dimension-value filters (includedValues array) enable you to reduce the size of your reports by specifying the dimensions returned or specifying the dimensions that are not returned.

{
  "reportOption": {
    "dimensionTypeIds": [ 5 ],
    "filterOptions": [
      {
        "includeValues": [
          {
            "name": "France",
            "id": "250"
          }
        ],
       "isExcluded": "false",
        "dimensionTypeId": 19
      }
    ],
    ...

Do not use the same dimension type ID to filter and group report data. The dimensionTypeId array identifies the dimensions used to group report data. The Filter objects’s dimensionTypeId attribute defines only a dimension to filter report data.

Instead, specify another dimension type ID in the dimensionTypeIds array and create a top-N report by specifying a limit attribute to reduce the scope of the report. For example, it is better to create a report that shows information about ad spend in the top ten cities rather than in all cities:

{
  "dimensionTypeIds": [21],
  "limitSpec": {
    "columns": [
      {
        "metricTypeId": 44
      }
    ],
    "limit": 10,
  }
}