Package google.mybusiness.performance.v1

索引

PerformanceService

借助此服务,商家可以提取其商家资料在 Google 上的效果报告。

API 尝试遵循 aip.dev 上找到的准则。

FetchMultiDailyMetricsTimeSeries

rpc FetchMultiDailyMetricsTimeSeries(FetchMultiDailyMetricsTimeSeriesRequest) returns (FetchMultiDailyMetricsTimeSeriesResponse)

返回指定时间范围内每个日期的值,以及与特定每日指标关联的可选子实体类型(如适用)。

示例请求:GET https://businessprofileperformance.googleapis.com/v1/locations/12345:fetchMultiDailyMetricsTimeSeries?dailyMetrics=WEBSITE_CLICKS&dailyMetrics=CALL_CLICKS&daily_range.start_date.year=2022&daily_range.start_date.month=1&daily_range.start_date.day=1&daily_range.end_date.year=2022&daily_range.end_date.month=3&daily_range.end_date.day=31

授权范围

需要以下 OAuth 范围:

  • https://www.googleapis.com/auth/business.manage

如需了解详情,请参阅 OAuth 2.0 概览。

GetDailyMetricsTimeSeries

rpc GetDailyMetricsTimeSeries(GetDailyMetricsTimeSeriesRequest) returns (GetDailyMetricsTimeSeriesResponse)

返回指定时间范围内与特定每日指标相关联的每个日期的值。

示例请求:GET https://businessprofileperformance.googleapis.com/v1/locations/12345:getDailyMetricsTimeSeries?dailyMetric=WEBSITE_CLICKS&daily_range.start_date.year=2022&daily_range.start_date.month=1&daily_range.start_date.day=1&daily_range.end_date.year=2022&daily_range.end_date.month=3&daily_range.end_date.day=31

授权范围

需要以下 OAuth 范围:

  • https://www.googleapis.com/auth/business.manage

如需了解详情,请参阅 OAuth 2.0 概览。

ListSearchKeywordImpressionsMonthly

rpc ListSearchKeywordImpressionsMonthly(ListSearchKeywordImpressionsMonthlyRequest) returns (ListSearchKeywordImpressionsMonthlyResponse)

返回用于在 Google 搜索或 Google 地图中查找商家的搜索关键字。每个搜索广告关键字都附有按月汇总的展示次数。

示例请求:GET https://businessprofileperformance.googleapis.com/v1/locations/12345/searchkeywords/impressions/monthly?monthly_range.start_month.year=2022&monthly_range.start_month.month=1&monthly_range.end_month.year=2022&monthly_range.end_month.month=3

授权范围

需要以下 OAuth 范围:

  • https://www.googleapis.com/auth/business.manage

如需了解详情,请参阅 OAuth 2.0 概览。

DailyMetric

表示商家的所有可用每日指标。

枚举
DAILY_METRIC_UNKNOWN 表示默认的未知值。
BUSINESS_IMPRESSIONS_DESKTOP_MAPS 桌面设备上 Google 地图中的商家展示次数。如果唯一身份用户在一天内多次看到同一广告,系统只会将其计为一次展示。
BUSINESS_IMPRESSIONS_MOBILE_MAPS 移动设备上 Google 地图中的商家展示次数。如果唯一身份用户在一天内多次看到同一广告,系统只会将其计为一次展示。
BUSINESS_CONVERSATIONS

商家资料中收到的消息对话数量。

BUSINESS_DIRECTION_REQUESTS 用户向营业地点查询路线的次数。
CALL_CLICKS 商家资料中的“致电”按钮获得的点击次数。
WEBSITE_CLICKS 商家资料网站获得的点击次数。
BUSINESS_BOOKINGS 通过商家资料经由“通过 Google 预订”功能完成的预订次数。
BUSINESS_FOOD_ORDERS

通过商家资料收到的订餐次数。

BUSINESS_FOOD_MENU_CLICKS 用户点击查看或互动商家资料中的菜单内容的次数。如果唯一身份用户在一天内多次点击,则计为 1 次。

DailyMetricTimeSeries

表示单个数据点,其中每个数据点都是一个 DailyMetric-DailySubEntityType-TimeSeries 元组。

字段
daily_metric

DailyMetric

相应 TimeSeries 所代表的 DailyMetric。

daily_sub_entity_type

DailySubEntityType

相应时间序列所表示的 DailySubEntityType。如果不存在细分,则不会显示。

time_series

TimeSeries

数据点列表,其中每个数据点都是一个日期-值对。

DailyRange

表示日期范围(均含)的时间范围。

字段
start_date

Date

必需。包容

end_date

Date

必需。包容

DailySubEntityType

表示与 DailyMetrics 关联的所有可能的子实体类型。

字段
联合字段 Type。表示必须仅存在以下 proto 字段之一。DailySubEntityType 并非适用于所有指标。Type 只能是下列其中一项:
day_of_week

DayOfWeek

表示星期几。例如:MONDAY。目前支持的 DailyMetrics = NONE。

time_of_day

TimeOfDay

以 24 小时制表示一天中的时间。例如:13:34:20 目前支持的 DailyMetrics 为 NONE。

DatedValue

表示时序中的单个数据点,其中每个数据点都是日期-值对。

字段
date

Date

数据点对应的日期。如果未设置日期字段,则表示月份值。

value

int64

数据点的值。如果值为零,则不会显示此字段。

FetchMultiDailyMetricsTimeSeriesRequest

表示对 FetchMultiDailyMetricsTimeSeries 的请求。

字段
location

string

必需。应提取时序的位置。格式:locations/{location_id},其中 location_id 是未经混淆处理的房源信息 ID。

daily_metrics[]

DailyMetric

必需。要检索时序的指标。

daily_range

DailyRange

必需。要提取的时序的时间范围。

FetchMultiDailyMetricsTimeSeriesResponse

表示 FetchMultiDailyMetricsTimeSeries 的响应。

字段
multi_daily_metric_time_series[]

MultiDailyMetricTimeSeries

DailyMetrics 及其对应的时序。

GetDailyMetricsTimeSeriesRequest

表示对 GetDailyMetricsTimeSeries 的请求。

字段
name

string

必需。应提取时序的位置。格式:locations/{location_id},其中 location_id 是未经混淆处理的房源信息 ID。

daily_metric

DailyMetric

必需。要检索的时序所对应的指标。

daily_range

DailyRange

必需。要提取的时序的时间范围。

daily_sub_entity_type

DailySubEntityType

可选。时序所关联的子实体类型和 ID。目前支持的 DailyMetrics = NONE。

GetDailyMetricsTimeSeriesResponse

表示 GetDailyMetricsTimeSeries 的响应。

字段
time_series

TimeSeries

每日时间序列。

InsightsValue

表示数据分析值。

字段
联合字段 InsightsValue。表示必须仅存在以下 proto 字段之一。InsightsValue 只能是下列其中一项:
value

int64

表示实际值。

threshold

int64

表示实际值低于的阈值。

ListSearchKeywordImpressionsMonthlyRequest

表示针对 ListSearchKeywordImpressionsMonthly 的请求。

字段
parent

string

必需。应提取时序的位置。格式:locations/{location_id},其中 location_id 是未经混淆处理的房源信息 ID。

monthly_range

MonthlyRange

必需。汇总搜索关键字展示次数的时间范围(以月为单位)。

page_size

int32

可选。请求的结果数。默认页面大小为 100。页面大小最多可设置为 100。

page_token

bytes

可选。一个令牌,用于指示要返回的下一个分页结果。

ListSearchKeywordImpressionsMonthlyResponse

表示针对 ListSearchKeywordImpressionsMonthly 的响应。

字段
search_keywords_counts[]

SearchKeywordCount

用户用来查找商家的搜索字词。

next_page_token

bytes

一个令牌,用于指示返回的最后一个分页结果。后续请求可以使用此值来获取下一“页”关键字。仅当有更多结果要返回时才会显示。

MonthlyRange

表示月份范围(均包含在内)的时间范围。

字段
start_month

Date

必需。包含 - 系统只会考虑年份和月份字段

end_month

Date

必需。包含 - 系统只会考虑年份和月份字段

MultiDailyMetricTimeSeries

表示 DailyMetric-DailySubEntityType-TimeSeries 元组的列表。

字段
daily_metric_time_series[]

DailyMetricTimeSeries

DailyMetric-TimeSeries 对的列表。

SearchKeywordCount

表示单个搜索广告关键字及其值。

字段
search_keyword

string

用户输入的小写字符串。

insights_value

InsightsValue

以下任一值:1) 在一个月内使用过相应关键字的唯一身份用户数之和,按所请求的每个月进行汇总。2) 一个阈值,表示实际值低于此阈值。

TimeSeries

表示时间序列。

字段
dated_values[]

DatedValue

时间序列中的数据点列表,其中每个数据点都是一个日期-值对。