Google Apps Script API
    Preparing search index...
    interface GaDataQuery {
        dimensions?: string;
        "end-date"?: string;
        filters?: string;
        ids?: string;
        "max-results"?: number;
        metrics?: string;
        samplingLevel?: "DEFAULT" | "FASTER" | "HIGHER_PRECISION";
        segment?: string;
        sort?: string;
        "start-date"?: string;
        "start-index"?: number;
    }
    Index

    Properties

    dimensions?: string

    A list of comma-separated dimensions for your Analytics data, such as ga:browser,ga:city.

    "end-date"?: string

    End date for fetching Analytics data. Request can specify an end date formatted as YYYY-MM-DD, or as a relative date (e.g., today, yesterday, or NdaysAgo where N is a positive integer).

    filters?: string

    Dimension or metric filters that restrict the data returned for your request.

    ids?: string

    The unique table ID of the form ga:XXXX, where XXXX is the Analytics view (profile) ID for which the query will retrieve the data.

    "max-results"?: number

    The maximum number of rows to include in the response.

    metrics?: string

    A list of comma-separated metrics, such as ga:sessions,ga:bounces.

    samplingLevel?: "DEFAULT" | "FASTER" | "HIGHER_PRECISION"

    The desired sampling level. Allowed Values: DEFAULT — Returns response with a sample size that balances speed and accuracy. FASTER — Returns a fast response with a smaller sample size. HIGHER_PRECISION — Returns a more accurate response using a large sample size, but this may result in the response being slower.

    segment?: string

    Segments the data returned for your request.

    sort?: string

    A list of comma-separated dimensions and metrics indicating the sorting order and sorting direction for the returned data.

    "start-date"?: string

    Start date for fetching Analytics data. Requests can specify a start date formatted as YYYY-MM-DD, or as a relative date (e.g., today, yesterday, or NdaysAgo where N is a positive integer).

    "start-index"?: number

    The first row of data to retrieve, starting at 1. Use this parameter as a pagination mechanism along with the max-results parameter.