周期性受众群体名单
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
本文档介绍了周期性受众群体名单,这是 Google Analytics Data API v1 的高级功能。如需简要了解受众群体名单导出功能,请参阅受众群体导出基础知识指南。
周期性受众群体名单会根据受众群体成员资格变化每天生成受众群体名单,以确保您使用的是最新数据。
常规(非周期性)受众群体名单是指在名单生成时受众群体中的用户的静态名单。
每天创建一个新的受众群体名单
处理一天的受众群体数据和更新会员资格所需的时间不尽相同。我们无法确保受众群体名单数据会在 24 小时内更新。
例如,即使您每天在同一时间请求受众群体名单,但在某些天,受众群体名单会与前一天相同,而在其他天,受众群体名单会有所不同,并且包含额外一天的成员变化。

受众群体名单基于最近一次会员资格变更前一天的事件数据。如果您在每日会员资格更新之前创建受众群体名单,则该名单将使用前两天的数据。如果您在每日会员资格更新后创建受众群体名单,则该名单将使用昨天的数据。
定期轮询周期性受众群体名单
只有在有额外一天的数据可用时,周期性受众群体名单才会生成受众群体名单。这样,您就不必再猜测何时创建新的受众群体名单。不过,您可以全天以低成本轮询周期性受众群体名单,以查看是否有其他数据可用。

创建周期性受众群体名单
如需创建周期性受众群体名单,请在请求中使用 RecurringAudienceList
对象调用 recurringAudienceLists.create
方法。以下是必填参数:
以下是周期性受众群体名单创建请求示例:
HTTP 请求
POST https://analyticsdata.googleapis.com/v1alpha/properties/1234567/recurringAudienceLists
{
"audience": "properties/1234567/audiences/12345",
"dimensions": [
{
"dimensionName": "deviceId"
}
]
}
recurringAudienceLists.create
方法的响应包含 name
字段中的名称(例如 properties/1234567/recurringAudienceLists/123
),可在后续查询中用于检索此周期性受众群体名单的配置元数据。此外,配置元数据还包含为此周期性受众群体名单创建的受众群体名单实例的资源名称。
HTTP 响应
{
"name": "properties/1234567/recurringAudienceLists/123",
"audience": "properties/1234567/audiences/12345",
"audienceDisplayName": "Purchasers",
"dimensions": [
{
"dimensionName": "deviceId"
}
],
"activeDaysRemaining": 180,
"audienceLists": [
"properties/1234567/audienceLists/45678"
]
}
使用 recurringAudienceLists.get
方法检索有关特定周期性受众群体名单的配置元数据。配置元数据包含为此周期性受众群体名单创建的受众群体名单实例的资源名称。
示例如下:
HTTP 请求
GET https://analyticsdata.googleapis.com/v1alpha/properties/1234567/recurringAudienceLists/123
系统会在响应中返回 RecurringAudienceList
的实例。它包含配置元数据,其中包括为此周期性受众群体名单创建的受众群体名单实例的资源名称。
HTTP 响应
{
"name": "properties/1234567/recurringAudienceLists/123",
"audience": "properties/1234567/audiences/12345",
"audienceDisplayName": "Purchasers",
"dimensions": [
{
"dimensionName": "deviceId"
}
],
"activeDaysRemaining": 180,
"audienceLists": [
"properties/1234567/audienceLists/45678"
]
}
您可以使用 recurringAudienceLists.list
列出媒体资源的所有周期性受众群体名单。
使用 Webhook 接收有关新受众群体名单的异步通知
您可以选择在有受众群体名单可用时异步接收 Webhook 通知,而不是使用 recurringAudienceLists.get
方法定期轮询特定周期性受众群体名单的配置元数据。
如需配置网络钩子通知,请在创建新的周期性受众群体名单时指定 webhookNotification
字段。
如需详细了解如何在 Google Analytics Data API v1 中使用 Webhook,请参阅 Async audience lists with webhooks
指南。
检索导出的受众群体中的用户
如需检索受众群体导出中的用户,请调用 audienceExports.query
方法,并指定从 recurringAudienceLists.get
或 recurringAudienceLists.list
提供的配置元数据中检索到的受众群体导出名称。
HTTP 请求
POST https://analyticsdata.googleapis.com/v1beta/properties/1234567/audienceExports/123:query
如果受众群体导出操作已准备就绪,系统会返回一个响应,其中包含受众群体中的用户列表:
HTTP 响应
{
"audienceExport": {
"name": "properties/1234567/audienceExports/123",
"audience": "properties/1234567/audiences/12345",
"audienceDisplayName": "Purchasers",
"dimensions": [
{
"dimensionName": "deviceId"
}
],
"state": "ACTIVE",
"beginCreatingTime": "2023-06-22T23:35:28.787910949Z"
},
"audienceRows": [
{
"dimensionValues": [
{
"value": "1000276123.1681742376"
}
]
},
{
"dimensionValues": [
{
"value": "1000374452.1668627377"
}
]
},
{
"dimensionValues": [
{
"value": "1000391956.1652750758"
}
]
},
{
"dimensionValues": [
{
"value": "1000410539.1682018694"
}
]
},
{
"dimensionValues": [
{
"value": "1000703969.1666725875"
}
]
}
],
"rowCount": 5
}
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-26。
[null,null,["最后更新时间 (UTC):2025-07-26。"],[[["\u003cp\u003eRecurring audience lists automatically update daily with audience membership changes, providing access to the most recent data.\u003c/p\u003e\n"],["\u003cp\u003eThese lists are generated based on event data from one to two days prior, depending on the timing of daily membership updates.\u003c/p\u003e\n"],["\u003cp\u003eYou can poll a recurring audience list frequently to check for data updates or utilize webhooks for asynchronous notifications about new audience lists.\u003c/p\u003e\n"],["\u003cp\u003eTo create a recurring audience list, you need to specify the audience name and desired dimensions using the \u003ccode\u003erecurringAudienceLists.create\u003c/code\u003e method.\u003c/p\u003e\n"],["\u003cp\u003eRetrieving users in an audience export involves calling the \u003ccode\u003eaudienceExports.query\u003c/code\u003e method with the audience export name obtained from the recurring audience list's configuration metadata.\u003c/p\u003e\n"]]],["Recurring audience lists update daily with membership changes, unlike static, regular lists. To create one, use the `recurringAudienceLists.create` method, specifying a valid audience name and dimensions. These lists are updated when new data is available, and polling the list via `recurringAudienceLists.get` reveals if new data is present. Alternatively, webhooks can provide asynchronous notifications. Use `audienceExports.query` to retrieve users from an audience export based on the recurring audience lists.\n"],null,["# Recurring audience lists\n\nThis document describes recurring audience lists, which are an\nadvanced feature of the Google Analytics Data API v1.\nFor an introduction to the audience list export feature,\nsee the [audience export fundamentals guide](/analytics/devguides/reporting/data/v1/audience-export-basics).\n\nRecurring audience lists produce audience lists daily as\naudience memberships change, to ensure you're working with the most recent data.\n\nRegular (non-recurring) audience lists are static lists of users in the audience\nat the time the list is generated.\n\nCreate a new audience list daily\n--------------------------------\n\nIt takes a variable amount of time to process one day's audience data and update\nmembership. There's no way to be sure that the audience list data is updated in\n24 hours.\n\nFor example, even if you request an audience list at the same time each day,\non some days the audience list will be the same\nas the previous day, and on other days, the audience list will be different and\ncontain an additional day of membership changes.\n\nAudience lists are based on event data from one day before the most recent\nmembership changes. If you create an audience list before daily membership\nupdates occur, it will use data from the two days before. If you create an\naudience list after daily membership updates occur, it will use data from\nyesterday.\n\nPeriodically poll a recurring audience list\n-------------------------------------------\n\nRecurring Audience Lists only produce Audience Lists when an additional day's\ndata is available. This removes the guesswork of deciding when to create new\nAudience Lists. Instead, you can cheaply poll the Recurring Audience List\nthroughout the day to see if additional data is available.\n\nCreate a Recurring Audience List\n--------------------------------\n\nTo create a recurring audience list, call the\n[`recurringAudienceLists.create`](/analytics/devguides/reporting/data/v1/rest/v1alpha/properties.recurringAudienceLists/create)\nmethod using the\n[`RecurringAudienceList`](/analytics/devguides/reporting/data/v1/rest/v1alpha/properties.recurringAudienceLists#RecurringAudienceList)\nobject in a request. The following parameters are required:\n\n- A valid audience name in the [`audience`](/analytics/devguides/reporting/data/v1/rest/v1alpha/properties.recurringAudienceLists#RecurringAudienceList.FIELDS.audience) field, formatted as `properties/{propertyId}/audiences/{audienceId}`. You can use the [`audiences.list`](/analytics/devguides/config/admin/v1/rest/v1alpha/properties.audiences/list) method of the Google Analytics Admin API v1 to obtain this value. The [`Audience.name`](/analytics/devguides/config/admin/v1/rest/v1alpha/properties.audiences#Audience.FIELDS.name) field of the `audiences.list` response contains the audience name.\n- A valid list of dimensions in the [`dimensions`](/analytics/devguides/reporting/data/v1/rest/v1alpha/properties.recurringAudienceLists#RecurringAudienceList.FIELDS.dimensions) field. The list of dimensions supported by this method can be found in the [Audience Export Schema](/analytics/devguides/reporting/data/v1/audience-export-api-schema) documentation. Only the data for dimensions mentioned in this field is included in an Audience List.\n\nHere's a sample recurring audience list creation request: \n\n### HTTP Request\n\n POST https://analyticsdata.googleapis.com/v1alpha/properties/1234567/recurringAudienceLists\n {\n \"audience\": \"properties/1234567/audiences/12345\",\n \"dimensions\": [\n {\n \"dimensionName\": \"deviceId\"\n }\n ]\n }\n\nA response of the `recurringAudienceLists.create` method contains the\nname in the `name` field (such as\n`properties/1234567/recurringAudienceLists/123`), which can be used in\nsubsequent queries to retrieve the configuration metadata\nfor this recurring audience list. Also, the configuration metadata contains\n[resource names for audience list instances](/analytics/devguides/reporting/data/v1/rest/v1alpha/properties.recurringAudienceLists#RecurringAudienceList.FIELDS.audience_lists)\ncreated for this recurring audience list. \n\n### HTTP Response\n\n {\n \"name\": \"properties/1234567/recurringAudienceLists/123\",\n \"audience\": \"properties/1234567/audiences/12345\",\n \"audienceDisplayName\": \"Purchasers\",\n \"dimensions\": [\n {\n \"dimensionName\": \"deviceId\"\n }\n ],\n \"activeDaysRemaining\": 180,\n \"audienceLists\": [\n \"properties/1234567/audienceLists/45678\"\n ]\n }\n\nPoll configuration metadata\n---------------------------\n\nUse the\n[`recurringAudienceLists.get`](/analytics/devguides/reporting/data/v1/rest/v1alpha/properties.recurringAudienceLists/get)\nmethod to retrieve configuration metadata about a specific\nrecurring audience list. The configuration metadata contains\n[resource names for audience list instances](/analytics/devguides/reporting/data/v1/rest/v1alpha/properties.recurringAudienceLists#RecurringAudienceList.FIELDS.audience_lists)\ncreated for this recurring audience list.\n\nHere's an example: \n\n### HTTP Request\n\n GET https://analyticsdata.googleapis.com/v1alpha/properties/1234567/recurringAudienceLists/123\n\nAn instance of [`RecurringAudienceList`](/analytics/devguides/reporting/data/v1/rest/v1alpha/properties.recurringAudienceLists#RecurringAudienceList)\nis returned in response. It contains the configuration metadata, which includes\n[resource names for audience list instances](/analytics/devguides/reporting/data/v1/rest/v1alpha/properties.recurringAudienceLists#RecurringAudienceList.FIELDS.audience_lists)\ncreated for this recurring audience list. \n\n### HTTP Response\n\n {\n \"name\": \"properties/1234567/recurringAudienceLists/123\",\n \"audience\": \"properties/1234567/audiences/12345\",\n \"audienceDisplayName\": \"Purchasers\",\n \"dimensions\": [\n {\n \"dimensionName\": \"deviceId\"\n }\n ],\n \"activeDaysRemaining\": 180,\n \"audienceLists\": [\n \"properties/1234567/audienceLists/45678\"\n ]\n }\n\nYou can use\n[`recurringAudienceLists.list`](/analytics/devguides/reporting/data/v1/rest/v1alpha/properties.recurringAudienceLists/list)\nto list all recurring audience lists for a property.\n\n### Use Webhooks to receive asynchronous notifications about new audience lists\n\nInstead of periodically polling the configuration metadata about a specific\nrecurring audience list using the\n[`recurringAudienceLists.get`](/analytics/devguides/reporting/data/v1/rest/v1alpha/properties.recurringAudienceLists/get)\nmethod, you can asynchronously receive Webhook notifications when an audience\nlist becomes available.\n\nTo configure Webhook notifications, specify the\n[`webhookNotification`](/analytics/devguides/reporting/data/v1/rest/v1alpha/properties.recurringAudienceLists#RecurringAudienceList)\nfield when creating a new recurring audience list.\n\nFollow the [`Async audience lists with webhooks`](/analytics/devguides/reporting/data/v1/audience-lists-webhooks) guide\nfor more information about using Webhooks in the Google Analytics Data API v1.\n\n### Retrieve users in an audience export\n\nTo retrieve users in an Audience Export, call the\n[`audienceExports.query`](/analytics/devguides/reporting/data/v1/rest/v1beta/properties.audienceExports/query)\nmethod and specify the Audience Export name\nretrieved from the configuration metadata provided by\n[`recurringAudienceLists.get`](/analytics/devguides/reporting/data/v1/rest/v1alpha/properties.recurringAudienceLists/get)\nor [`recurringAudienceLists.list`](/analytics/devguides/reporting/data/v1/rest/v1alpha/properties.recurringAudienceLists/list). \n\n### HTTP Request\n\n POST https://analyticsdata.googleapis.com/v1beta/properties/1234567/audienceExports/123:query\n\nIf the Audience Export is ready, a response containing the list of\nusers in an audience is returned: \n\n### HTTP Response\n\n {\n \"audienceExport\": {\n \"name\": \"properties/1234567/audienceExports/123\",\n \"audience\": \"properties/1234567/audiences/12345\",\n \"audienceDisplayName\": \"Purchasers\",\n \"dimensions\": [\n {\n \"dimensionName\": \"deviceId\"\n }\n ],\n \"state\": \"ACTIVE\",\n \"beginCreatingTime\": \"2023-06-22T23:35:28.787910949Z\"\n },\n \"audienceRows\": [\n {\n \"dimensionValues\": [\n {\n \"value\": \"1000276123.1681742376\"\n }\n ]\n },\n {\n \"dimensionValues\": [\n {\n \"value\": \"1000374452.1668627377\"\n }\n ]\n },\n {\n \"dimensionValues\": [\n {\n \"value\": \"1000391956.1652750758\"\n }\n ]\n },\n {\n \"dimensionValues\": [\n {\n \"value\": \"1000410539.1682018694\"\n }\n ]\n },\n {\n \"dimensionValues\": [\n {\n \"value\": \"1000703969.1666725875\"\n }\n ]\n }\n ],\n \"rowCount\": 5\n }"]]