Method: projects.locations.brands.computeAnalyticsMetrics

Computes analytics metrics for a given brand for specified time period with optional store filter.

HTTP request

GET https://foodorderingaiagent.googleapis.com/v1/{brand=projects/*/locations/*/brands/*}:computeAnalyticsMetrics

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
brand

string

Required. The brand to get analytics metrics for. Format: projects/{project}/locations/{location}/brands/{brand}

Query parameters

Parameters
timestamps[]

string (Timestamp format)

Required. The timestamps that mark the start of each interval for which analytics metrics are calculated.

Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

storeIds[]

string

Optional. The list of store IDs to get analytics metrics for. If not specified, analytics metrics for all stores will be returned. Needed to query by city or state.

Request body

The request body must be empty.

Response body

Response message for MenuService.ComputeAnalyticsMetrics.

If successful, the response body contains data with the following structure:

JSON representation
{
  "analyticsMetrics": {
    object (AnalyticsMetrics)
  }
}
Fields
analyticsMetrics

object (AnalyticsMetrics)

Output only. The analytics metrics for the brand.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

AnalyticsMetrics

Represents analytics metrics for a given period, with a comparison to a previous period.

JSON representation
{
  "intervalMetrics": [
    {
      object (IntervalMetrics)
    }
  ]
}
Fields
intervalMetrics[]

object (IntervalMetrics)

Metrics for the intervals.

IntervalMetrics

Represents analytics metrics for a specific time interval.

JSON representation
{
  "interval": {
    object (Interval)
  },
  "totalOrderCount": string,
  "successOrderCount": string,
  "avgOrderDurationMs": string,
  "upsellSuccessRate": number,
  "upsellRevenue": {
    object (Money)
  },
  "escalationCount": string
}
Fields
interval

object (Interval)

The start / end time reflected by these metrics.

totalOrderCount

string (int64 format)

Output only. The total number of orders.

successOrderCount

string (int64 format)

Output only. The number of successful orders.

avgOrderDurationMs

string (int64 format)

Output only. The average order duration in ms.

upsellSuccessRate

number

Output only. The upsell success rate.

upsellRevenue

object (Money)

Output only. The upsell revenue.

escalationCount

string (int64 format)

Output only. The escalation outcome group count.