Best Practices

Prev Next

This article describes best practices for generating reports using the DSP Reporting API.

Time Series Report

Size

Normal

Description

dimensionTypeIds is an empty array. The number of report rows is determined by the time interval and normal granularity.

{
  "reportOption": {
    "dimensionTypeIds": [],
    "metricTypeIds": [ 44, 1, 2 ],
    ...
  }
}

Group By Report

Size

Huge

Description

dimensionTypeIds array has 1 or more values. Report row count is the product of cardinality of each dimension and time-axis. This would create a large report.

Top N Report

Size

Normal

Description

dimensionTypeIds array has only 1 value and there is limitSpec. The report size is the specified limit multiplied by size of time-axis. The example generates a report of Top 10 cities of Ad spending for some time period.

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

About End User-Related Dimensions

Reports contain ad impression events (including clicks). An event has both advertiser-related dimensions and end-user-related dimensions. Restrict the use of end-user related dimensions, which are high cardinality within a time interval. The following table lists the dimensions that are end-user related.

ID

Name

Description

Usage Restrictions

9

Domain Name

The unique Internet address for a website

Yes

27

Age

Demographic dimension: 13–17, 18–20, 21–24, 25–29, 30–34, 35–39, 40–44, 45–49, 50–54, 55–59, 60–64, 65+

Yes

25

Browser Type

Safari, Chrome, Firefox, IE, or Unknown

Yes

21

City

Geographic attribute for the city of a visitor

Yes

Note

  • Use filterOptions with dimensions to avoid large reports. Avoid grouping a report on these dimensions. Instead, request a top-n report. For example, it’s best to report on the ad spend in the top 10 cities rather than ad spend for all cities.

  • Timeframe and Granularity: Very granular reports that span long time periods, such as a year-to-date daily reports, are not permitted in a single API call. For these types of reports, break up the time period into multiple API calls.