- HTTP request
- Path parameters
- Request body
- Response body
- Authorization Scopes
- DrivingDirectionMetricsRequest
- NumDays
- LocationMetrics
- LocationDrivingDirectionMetrics
- TopDirectionSources
- RegionCount
Returns a report containing insights on one or more metrics by location.
HTTP request
POST https://mybusiness.googleapis.com/v4/{name=accounts/*}/locations:reportInsights
The URL uses gRPC Transcoding syntax.
Path parameters
Parameters | |
---|---|
name
|
The account resource name. |
Request body
The request body contains data with the following structure:
JSON representation | |
---|---|
{ "locationNames" : [ string ] , "basicRequest" : { object ( |
Fields | |
---|---|
locationNames[]
|
A collection of locations to fetch insights for, specified by their names. |
basicRequest
|
A request to include basic metric insights in the report. |
drivingDirectionsRequest
|
A request to include insights about driving-direction requests in the report. |
Response body
If successful, the response body contains data with the following structure:
Response message for Insights.ReportLocationInsights
.
JSON representation | |
---|---|
{ "locationMetrics" : [ { object ( |
Fields | |
---|---|
locationMetrics[]
|
A collection of metric values by location. |
locationDrivingDirectionMetrics[]
|
A collection of values for driving direction-related metrics. |
Authorization Scopes
Requires one of the following OAuth scopes:
-
https://www.googleapis.com/auth/plus.business.manage
-
https://www.googleapis.com/auth/business.manage
For more information, see the OAuth 2.0 Overview .
DrivingDirectionMetricsRequest
A request for driving direction insights.
JSON representation | |
---|---|
{
"numDays"
:
enum (
|
Fields | |
---|---|
numDays
|
The number of days to aggregate data for. Results returned will be available data over the last number of requested days. Valid values are 7, 30, and 90. |
languageCode
|
The BCP 47 code for the language. If a language code is not provided, it defaults to English. |
NumDays
Number of days that this request can support.
Enums | |
---|---|
SEVEN
|
7 days. This is the default value. |
THIRTY
|
30 days. |
NINETY
|
90 days. |
LocationMetrics
A series of Metrics and BreakdownMetrics associated with a Location over some time range.
JSON representation | |
---|---|
{
"locationName"
:
string
,
"timeZone"
:
string
,
"metricValues"
:
[
{
object (
|
Fields | |
---|---|
locationName
|
The location resource name these values belong to. |
timeZone
|
IANA timezone for the location. |
metricValues[]
|
A list of values for the requested metrics. |
LocationDrivingDirectionMetrics
A location indexed with the regions that people usually come from. This is captured by counting how many driving-direction requests to this location are from each region.
JSON representation | |
---|---|
{
"locationName"
:
string
,
"topDirectionSources"
:
[
{
object (
|
Fields | |
---|---|
locationName
|
The location resource name this metric value belongs to. |
topDirectionSources[]
|
Driving-direction requests by source region. By convention, these are sorted by count with at most 10 results. |
timeZone
|
Time zone (IANA timezone IDs, for example, 'Europe/London') of the location. |
TopDirectionSources
Top regions where driving-direction requests originated from.
JSON representation | |
---|---|
{
"dayCount"
:
integer
,
"regionCounts"
:
[
{
object (
|
Fields | |
---|---|
dayCount
|
The number of days data is aggregated over. |
regionCounts[]
|
Regions sorted in descending order by count. |
RegionCount
A region with its associated request count.
JSON representation | |
---|---|
{
"latlng"
:
{
object (
|
Fields | |
---|---|
latlng
|
Center of region. |
label
|
Human-readable label for the region. |
count
|
Number of driving-direction requests from this region. |