- HTTP 请求
 - 路径参数
 - 请求正文
 - 响应正文
 - 授权范围
 - DrivingDirectionMetricsRequest
          <ph type="x-smartling-placeholder">
- </ph>
            
 - JSON 表示法
 
 - NumDays
 - LocationMetrics
          <ph type="x-smartling-placeholder">
- </ph>
            
 - JSON 表示法
 
 - LocationDrivingDirectionMetrics
          <ph type="x-smartling-placeholder">
- </ph>
            
 - JSON 表示法
 
 - TopDirectionSources
          <ph type="x-smartling-placeholder">
- </ph>
            
 - JSON 表示法
 
 - RegionCount
          <ph type="x-smartling-placeholder">
- </ph>
            
 - JSON 表示法
 
 
返回按地理位置对一个或多个指标进行分析的报告。
HTTP 请求
POST https://mybusiness.googleapis.com/v4/{name=accounts/*}/locations:reportInsights
网址采用 gRPC 转码语法。
路径参数
| 参数 | |
|---|---|
name | 
                
                   
 账号资源名称。  | 
              
请求正文
请求正文中包含结构如下的数据:
| JSON 表示法 | |
|---|---|
{ "locationNames": [ string ], "basicRequest": { object (  | 
                |
| 字段 | |
|---|---|
locationNames[] | 
                  
                     
 要获取其数据分析的营业地点集合,按其名称指定。  | 
                
basicRequest | 
                  
                     
 请求在报告中包含基本指标数据分析。  | 
                
drivingDirectionsRequest | 
                  
                     
 请求在报告中包含有关行车路线请求的数据分析。  | 
                
响应正文
如果成功,响应正文将包含结构如下的数据:
Insights.ReportLocationInsights 的响应消息。
| JSON 表示法 | |
|---|---|
{ "locationMetrics": [ { object (  | 
                  |
| 字段 | |
|---|---|
locationMetrics[] | 
                    
                       
 按位置划分的指标值的集合。  | 
                  
locationDrivingDirectionMetrics[] | 
                    
                       
 行车路线相关指标的一系列值。  | 
                  
授权范围
需要以下 OAuth 范围之一:
https://www.googleapis.com/auth/plus.business.managehttps://www.googleapis.com/auth/business.manage
如需了解详情,请参阅 OAuth 2.0 概览。
DrivingDirectionMetricsRequest
查询行车路线的请求。
| JSON 表示法 | |
|---|---|
{
  "numDays": enum ( | 
              |
| 字段 | |
|---|---|
numDays | 
                
                   
 用于汇总数据的天数。返回的结果将提供最近请求天数的数据。有效值为 7、30 和 90。  | 
              
languageCode | 
                
                   
 语言的 BCP 47 代码。如果未提供语言代码,则默认为英语。  | 
              
NumDays
此请求可支持的天数。
| 枚举 | |
|---|---|
SEVEN | 
                7 天。这是默认值。 | 
THIRTY | 
                30 天。 | 
NINETY | 
                90 天。 | 
LocationMetrics
在特定时间范围内与营业地点相关联的一系列指标和 BreakdownMetrics。
| JSON 表示法 | |
|---|---|
{
  "locationName": string,
  "timeZone": string,
  "metricValues": [
    {
      object ( | 
              |
| 字段 | |
|---|---|
locationName | 
                
                   
 这些值所属的营业地点资源名称。  | 
              
timeZone | 
                
                   
 相应位置的 IANA 时区。  | 
              
metricValues[] | 
                
                   
 所请求指标的值列表。  | 
              
LocationDrivingDirectionMetrics
根据用户通常所在区域编制索引的位置。可通过计算从每个区域到此位置的行车路线请求数量来捕获数据。
| JSON 表示法 | |
|---|---|
{
  "locationName": string,
  "topDirectionSources": [
    {
      object ( | 
              |
| 字段 | |
|---|---|
locationName | 
                
                   
 此指标值所属的营业地点资源名称。  | 
              
topDirectionSources[] | 
                
                   
 按来源区域划分的行车路线请求。按照惯例,这些结果按计数排序,最多显示 10 个结果。  | 
              
timeZone | 
                
                   
 地理位置的时区(IANA 时区 ID,例如“欧洲/伦敦”)。  | 
              
TopDirectionSources
发出行车路线请求次数最多的区域。
| JSON 表示法 | |
|---|---|
{
  "dayCount": integer,
  "regionCounts": [
    {
      object ( | 
              |
| 字段 | |
|---|---|
dayCount | 
                
                   
 数据汇总的天数。  | 
              
regionCounts[] | 
                
                   
 地区是按数量降序排序的。  | 
              
RegionCount
区域及其关联的请求数。
| JSON 表示法 | |
|---|---|
{
  "latlng": {
    object ( | 
              |
| 字段 | |
|---|---|
latlng | 
                
                   
 区域的中心。  | 
              
label | 
                
                   
 直观易懂的区域标签。  | 
              
count | 
                
                   
 来自此区域的驾车路线请求数量。  |