---
metadata:
  - name: generator
    content: Diplodoc Platform v5.70.0
alternate:
  - https://appmetrica.yandex.com.tr/docs/en/sdk/android/analytics/android-product-flow.md
  - https://appmetrica.yandex.com.tr/docs/ru/sdk/android/analytics/android-product-flow.md
  - https://appmetrica.yandex.com.tr/docs/zh/sdk/android/analytics/android-product-flow.md
  - href: https://appmetrica.yandex.com.tr/docs/zh/sdk/android/analytics/android-product-flow.md
    type: text/markdown
    title: Markdown version
  - href: https://appmetrica.yandex.com.tr/docs/zh/llms.txt?revision=r22089357
    rel: describedby
---
> **Documentation Index:** Fetch the complete configuration index at https://appmetrica.yandex.com.tr/docs/zh/llms.txt?revision=r22089357

# 产品流程和优惠事件

{% note info "Product Flow 模块" %}

要使用此功能，请添加 `io.appmetrica.analytics:analytics-product-flow` 模块。 模块版本必须与 `io.appmetrica.analytics:analytics` 库版本匹配。

将以下依赖添加到您的应用的 `build.gradle.kts`：

```kotlin translate=no
dependencies {
    implementation("io.appmetrica.analytics:analytics-product-flow:8.5.1")
}
```

{% endnote %}

## 关于该方法 {#details}

**产品流程** 是一种新的方案，用于标准化应用程序中提供物、购买、申请以及多步骤产品和服务结算流程的AppMetrica事件。

要了解有关模块的更多信息和完整的用户场景，请参见[产品场景中的优惠事件](https://appmetrica.yandex.com.tr/docs/zh/data-collection/offers.md)。

这种方法有助于为以下实体和场景标准化分析：

- product offerings;
- marketing offers;
- 产品和服务购买；
- user funnels;
- checkout steps;
- 申请和批准结果；
- 异步 S2S 结果。

我们建议为以下类型的应用使用产品流程（Product Flow）方法：

- banks;
- 保险服务；
- telecom apps;
- 预订和旅行服务；
- subscription services;
- 送货服务；
- marketplaces;
- 游戏应用；
- 任何具有产品场景、购买和漏斗分析的应用。

{% note tip "不要使用自定义事件和DSA限制" %}

新的标准事件不计入：

- the `自定义事件` 限制;
- the `数据流 API` 限制。

这让您能够：

- 逐步采用新的事件方案；
- 发送更多产品场景和步骤；
- 在不消耗自定义事件和 DSA 限额的情况下，构建详细的漏斗和分析。

{% endnote %}

## 主要事件 {#main-events}

交互方案是基于4个主要事件构建的：

#|
|| **事件** | **含义** ||
|| `offerShown` | 用户看到了一个要约或提议 ||
|| `flowStart` | 用户开始了产品购买流程 ||
|| `flowStep` | 一个中间的结算步骤 ||
|| `flowResult` | 最终结果 ||
|#

## 事件示例 {#examples}

### offerShown {#example-offerShown}

用户看到了一个广告栏：“您已预批准贷款额度最高为 500,000 ₽，利率从 12.5% 开始。”

```kotlin translate=no
AppMetrica.reportEvent(
    ProductFlowEvent.offerShown("credit_q1", "financial_product")
        .withProductId("personal_loan")
        .withBenefitType("discount_percentage")
        .withReferrer(
                OfferReferrer.newBuilder()
                    .withType("banner")
                    .withIdentifier("main_screen_credit_banner")
                    .withScreen("main")
                    .build()
        )
        .withPayload(mapOf(
            "campaign_id" to "credit_spring_2026",
            "segment" to "preapproved_users",
            "approved_limit" to "500000",
            "currency" to "RUB",
            "interest_rate" to "12.5"
        ))
        .build()
)
```

### flowStart {#example-flowStart}

用户点击广告牌并启动应用程序。

```kotlin translate=no
AppMetrica.reportEvent(
    ProductFlowEvent.flowStart("personal_loan")
        .withProductOfferId("credit_q1")
        .build()
)
```

### flowStep {#example-flowStep}

用户上传文档。

```kotlin translate=no
AppMetrica.reportEvent(
    ProductFlowEvent.flowStepForProduct("personal_loan", "documents")
        .withProductOfferId("credit_q1")
        .withStepOption("passport_upload")
        .build()
)
```

### flowResult {#example-flowResult}

后来银行通过S2S发送最终结果。

```kotlin translate=no
AppMetrica.reportEvent(
    ProductFlowEvent.flowResultForProduct(ProductFlowStatus.SUCCESS, "personal_loan")
        .withProductOfferId("credit_q1")
        .withPrice(OfferPrice(430000.0, "RUB"))
        .withPayload(mapOf(
            "application_id" to "loan_app_12345",
            "decision_source" to "s2s"
        ))
        .build()
)
```

<!-- source: zh/_includes/feedback-button-3.md -->
如果您没有找到所需答案，可以通过反馈表单提交您的问题。 请尽可能详细地描述问题。 如果可能，请附上截图。

<a href="../troubleshooting/feedback-new">
  <span class="button">联系支持</span>
</a>

<a href="../troubleshooting/feedback-docs">
  <span class="button">为文档提出改进建议</span>
</a>
<!-- endsource: zh/_includes/feedback-button-3.md -->
