Install Userpilot on Ionic-Capacitor Application
build.gradle
must have a compileSdkVersion
of 34+ and minSdkVersion
of 21+, and use Android Gradle Plugin (AGP) 8+.
Podfile
, include at least this minimum version.
<APP_TOKEN>
with your Application Token, which can be fetched from your Environments Page.
identify
when a user signs in to establish their identity for all future events.identify
at app launch.id
is required in company properties, to identify a unique company.locale_code
with a value that adheres to ISO 639-1 format.email
to pass the user’s email.name
to pass the user’s or company’s name.created_at
to pass the user’s or company’s signed up date.logout()
to clear the current user context. This ensures subsequent events are no longer associated with the previous user.
anonymous()
to track events without a user ID. This is useful for pre-signup flows or guest user sessions.
url: string
– The custom deep link URL that should be handled by the host (client) app.analytic: string
– The name or type of the analytic event ("Identify"
, "Screen"
, "Event"
).value: string
– The value associated with the event.properties: Map<string, any>
– Additional key-value pairs providing context for the event.onExperienceStateChanged(id: int, state: string)
Called when the overall state of an experience changes.
id
: Experience ID (optional)state
: New state — "Started"
, "Completed"
, "Dismissed"
, "Skipped"
, or "Submitted"
experienceType
: "Flow"
, "Survey"
, or "NPS"
onExperienceStepStateChanged(id: int, state: string, experienceId: int, step: int, totalSteps: int)
Called when the state of a specific step in an experience changes.
id
: Step IDstate
: New step state — "Started"
, "Completed"
, "Dismissed"
, "Skipped"
, or "Submitted"
experienceId
: Associated experience IDexperienceType
: "Flow"
, "Survey"
, or "NPS"
step
: Current step index (optional)totalSteps
: Total number of steps in the experience (optional)UserpilotExperienceEvent
.
<service>
. Go to your Manifest file under example-app -> android -> app -> manifest
and add:
UserpilotFirebaseMessagingService
to your service class.
<resources>
properties. In order change those properties create a file under res/values
under example-app -> android -> app
and set it to desired values.
UIApplicationDelegate
and UNUserNotificationCenterDelegate
methods.
To enable automatic configuration, call Userpilot.enableAutomaticPushConfig()
from UIApplicationDelegate.application(_:didFinishLaunchingWithOptions:)
inside example-app -> ios -> AppDelegate.swift
.