Product flow and offer events

Product Flow module

To use this functionality, add the io.appmetrica.analytics:analytics-product-flow module. The module version must match the io.appmetrica.analytics:analytics library version.

Add the following dependency to your app's build.gradle.kts:

dependencies {
    implementation("io.appmetrica.analytics:analytics-product-flow:8.4.0")
}

About the approach

Product Flow is a new schema for standard AppMetrica events in apps with offers, purchases, applications, and multi-step product and service checkout flows.

For more information about the module and complete user scenarios, see Architecture of Product Scenarios and Offer Events.

This approach helps standardize analytics for the following entities and scenarios:

  • product offerings;
  • marketing offers;
  • product and service purchases;
  • user funnels;
  • checkout steps;
  • applications and approval results;
  • asynchronous S2S results.

We recommend using the Product Flow approach for the following types of apps:

  • banks;
  • insurance services;
  • telecom apps;
  • booking and travel services;
  • subscription services;
  • delivery services;
  • marketplaces;
  • gaming apps;
  • any apps with product scenarios, purchases, and funnel analytics.

Do not consume custom events and DSA limits

The new standard events are not counted toward:

  • the custom events limit;
  • the Data Stream API limit.

This lets you:

  • gradually adopt the new event schema;
  • send more product scenarios and steps;
  • build detailed funnels and analytics without consuming custom event and DSA limits.

Main events

The interaction schema is built around 4 main events:

Event

Meaning

offerShown

The user saw an offer or a proposal

flowStart

The user started the product checkout

flowStep

An intermediate checkout step

flowResult

The final result

Event examples

offerShown

The user saw a banner: "You are pre-approved for a loan of up to 500,000 ₽ at a rate starting from 12.5%."

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

The user taps the banner and starts the application.

AppMetrica.reportEvent(
    ProductFlowEvent.flowStart("personal_loan")
        .withProductOfferId("credit_q1")
        .build()
)

flowStep

The user uploads documents.

AppMetrica.reportEvent(
    ProductFlowEvent.flowStepForProduct("personal_loan", "documents")
        .withProductOfferId("credit_q1")
        .withStepOption("passport_upload")
        .build()
)

flowResult

Later the bank sends the final result via S2S.

AppMetrica.reportEvent(
    ProductFlowEvent.flowResultForProduct(ProductFlowStatus.SUCCESS, "personal_loan")
        .withProductOfferId("credit_q1")
        .withPayload(mapOf(
            "application_id" to "loan_app_12345",
            "approved_amount" to "430000",
            "currency" to "RUB",
            "decision_source" to "s2s"
        ))
        .build()
)

If you didn't find the answer you were looking for, you can use the feedback form to submit your question. Please describe the problem in as much detail as possible. Attach a screenshot if possible.

Contact support Suggest an improvement for documentation