Skip to content

Onboarding, onPaywall and onCustom callbacks does not trigger correct actionId's #225

@erenkulaksiz

Description

@erenkulaksiz

Description

Hello,

We're experiencing an issue with Adapty's onboarding builder where the onPaywall and onCustom callbacks are not receiving the action IDs configured in the dashboard.

Expected Behavior

According to the documentation, when a button with "Open paywall" or "Custom" action is triggered, the corresponding callback should receive the ID entered in the dashboard as the actionId parameter.

Current Behavior

The callbacks are triggered, but the actionId parameter contains a generic action name (onboarding_on_paywall_action or onboarding_on_custom_action) instead of the custom ID we configured in the dashboard.

Steps to Reproduce

  1. Create a button in the Adapty onboarding builder

  2. Set the action type to "Open paywall"

  3. Enter a custom ID (e.g., main_paywall_id) in the ID field:

    Dashboard configuration showing custom paywall ID
  4. Implement the event handlers in code:

<AdaptyOnboardingView
  onboarding={onboarding}
  style={{
    flex: 1,
  }}
  eventHandlers={{
    onCustom(actionId, meta) {
      console.log("onCustom", actionId, meta);
    },
    onPaywall(actionId, meta) {
      console.log("onPaywall", actionId, meta);
    }
  }}
/>

Actual Results

Open Paywall action:

onPaywall onboarding_on_paywall_action {"onboarding_id": "becb3e92-933a-4ef8-b568-06ee991b21f1", "screen_cid": "X19x4kXO", "screen_index": 16, "total_screens": 17}

Custom action:

onCustom onboarding_on_custom_action {"onboarding_id": "becb3e92-933a-4ef8-b568-06ee991b21f1", "screen_cid": "X19x4kXO", "screen_index": 16, "total_screens": 17}

We cant see the action id that we set in builder in callbacks when logged.

Steps to reproduce

  1. Create a simple onboarding flow using Adapty's onboarding builder
  2. Add a button and set its action type to "Custom" or "Open paywall"
  3. Enter a custom string as the action ID in the dashboard (e.g., main_paywall_id)
  4. Implement the event handlers and trigger the button
  5. Observe: The custom action ID is not passed to the onCustom or onPaywall callbacks - instead, you receive a generic action name like onboarding_on_custom_action

Expected behavior

We should be able to retrieve what we passed as ID in dashboard to callbacks.

Minimal reproduction code

import { AdaptyOnboardingView } from "react-native-adapty/dist/ui";

<AdaptyOnboardingView
  onboarding={onboarding}
  eventHandlers={{
    onCustom(actionId, meta) {
      console.log("onCustom", actionId, meta);
      // Expected: actionId = "main_paywall_id" (the ID from dashboard)
      // Actual: actionId = "onboarding_on_custom_action" (generic action name)
    },
    onPaywall(actionId, meta) {
      console.log("onPaywall", actionId, meta);
      // Expected: actionId = "main_paywall_id" (the ID from dashboard)
      // Actual: actionId = "onboarding_on_paywall_action" (generic action name)
    }
  }}
/>

Verbose Logs

Will provide if needed.

Adapty SDK Version

3.11.4

React Native Version

0.81.5

Expo Version

^54.0.23

What platforms are you seeing the problem on?

Both

Device/Simulator

Samsung A54 / iPhone 11

System info

System:
  OS: macOS 15.7.1
  CPU: (8) arm64 Apple M3
  Memory: 152.69 MB / 16.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 23.2.0
    path: /opt/homebrew/bin/node
  Yarn:
    version: 1.22.22
    path: /opt/homebrew/bin/yarn
  npm:
    version: 11.1.0
    path: /opt/homebrew/bin/npm
  Watchman:
    version: 2025.02.17.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.16.2
    path: /opt/homebrew/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 24.5
      - iOS 18.5
      - macOS 15.5
      - tvOS 18.5
      - visionOS 2.5
      - watchOS 11.5
  Android SDK: Not Found
IDEs:
  Android Studio: 2024.1 AI-241.15989.150.2411.11948838
  Xcode:
    version: 16.4/16F6
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 20.0.2
    path: /usr/bin/javac
  Ruby:
    version: 2.6.10
    path: /usr/bin/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react: Not Found
  react-native: Not Found
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: Not found
  newArchEnabled: Not found
iOS:
  hermesEnabled: Not found
  newArchEnabled: Not found

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions