Userpilot Capacitor Plugin enables you to capture user insights and deliver personalized in-app experiences in real time. With just a one-time setup, you can immediately begin leveraging Userpilot’s analytics and engagement features to understand user behaviors and guide their journeys in-app.This document provides a step-by-step walkthrough of the installation and initialization process, as well as instructions on using the SDK’s public APIs.
Your application must target iOS 13+ to install the SDK, Update the iOS project xcodeproj to set the deployment target, if needed. In the application’s Podfile, include at least this minimum version.
Add the Userpilot Capacitor Plugin dependency to your application.
In your app’s root directory, install the Userpilot Capacitor Plugin. You can fetch the latest version from here. Release notes are available here.
npm install @userpilot/capacitornpx cap sync
Userpilot supports CocoaPods and Swift Package Manager (SPM). Capacitor installs the native Userpilot dependency through the plugin, so you do not need to add it separately.To migrate an existing CocoaPods app or set up a new SPM project, follow Updating to Swift Package Manager.
To use Userpilot, initialize it once in your Application class. This ensures the SDK is ready as soon as your app starts. Update your Application class. Replace <APP_TOKEN> with your Application Token, which can be fetched from your Environments Page.
This API is used to identify unique users and companies (groups of users) and set their properties. Once identified, all subsequent tracked events and screens will be attributed to that user.
ImportantIt’s crucial to call the Userpilot identify function; without it, Userpilot won’t be able to recognize your users, and mobile content won’t be displayed to them.
Recommended Usage:
On user authentication (login): Immediately call identify when a user signs in to establish their identity for all future events.
On app launch for authenticated users: If the user has a valid authenticated session, call identify at app launch.
Upon property updates: Whenever user or company properties change.
Key id is required in company properties, to identify a unique company.
Userpilot supports String, Numeric, and Date types.
Make sure you’re sending date values in ISO8601 format.
If you are planning to use Userpilot’s localization features, make sure you are passing user property locale_code with a value that adheres to ISO 639-1 format.
Userpilot’s reserved properties’ have pre-determined types and improve profiles interface in the dashboard:
Use key email to pass the user’s email.
Use key name to pass the user’s or company’s name.
Use key created_at to pass the user’s or company’s signed up date.
Notes
Ensure the User ID source is consistent across Web, Android, and iOS.
While properties are optional, setting them enhances Userpilot’s segmentation capabilities.
Calling screen is crucial for unlocking Userpilot’s core engagement and analytics capabilities. When a user navigates to a particular screen, invoking screen records that view and triggers any eligible in-app experiences. Subsequent events are also attributed to the most recently tracked screen, providing context for richer analytical insights. For these reasons, we strongly recommend tracking all of your app’s screen views.
Log any meaningful action the user performs. Events can be button clicks, form submissions, or any custom activity you want to analyze. Optionally, you can pass metadata with the event to provide specific context.
This plugin uses the native Userpilot iOS SDK. When you ship to the App Store, follow the iOS Privacy Manifest guidance.
Was this page helpful?
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Userpilot Knowledge Base","colors":{"primary":"#6765e8","light":"#9a98f0","dark":"#343374"},"logo":{"light":"https://mintcdn.com/userpilot/KtUQBkEo7Hf3bjCu/up-logo-dark.svg?fit=max\u0026auto=format\u0026n=KtUQBkEo7Hf3bjCu\u0026q=85\u0026s=ed5988b05e17770537d7327506be349c","dark":"https://mintcdn.com/userpilot/KtUQBkEo7Hf3bjCu/up-logo-light.svg?fit=max\u0026auto=format\u0026n=KtUQBkEo7Hf3bjCu\u0026q=85\u0026s=2558daac7455ff6275b45a01cecb8ca9"},"favicon":"https://mintcdn.com/userpilot/KtUQBkEo7Hf3bjCu/up-favicon.svg?fit=max\u0026auto=format\u0026n=KtUQBkEo7Hf3bjCu\u0026q=85\u0026s=bd3fb42ae91a32d13d543fed45a8b88e","footer":{"socials":{"twitter":"https://linkedin.com/company/teamuserpilot","facebook":"https://facebook.com/userpilot","linkedin":"https://linkedin.com/company/teamuserpilot"},"links":[{"header":"Support","items":[{"label":"support@userpilot.com","href":"mailto:support@userpilot.com"}]}]},"seo":{"metatags":{"canonical":"https://docs.userpilot.com","og:site_name":"Userpilot Knowledge Base","og:type":"website","og:image":"https://docs.userpilot.com/up-logo-dark.svg","twitter:card":"summary_large_image","twitter:site":"@usaborpilot"}},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"userpilot","hasAudioNarration":false,"actualSubdomain":"userpilot","customDomains":["docs.userpilot.com"],"gitSource":{"type":"github","owner":"userpilot","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"feedback":{"edits":true,"issues":true,"thumbs":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6ae7105b88760f93b1002721","clientVersion":"0.0.4088","searchFilterCounts":[{"language":"default","tag":"Platform","count":137},{"language":"default","tag":"Developer","count":88},{"language":"default","tag":"Installation","count":76},{"language":"default","tag":"Mobile","count":68},{"language":"default","tag":"In App Engagement","count":56},{"language":"default","tag":"APIs","count":42},{"language":"default","tag":"Configure","count":23},{"language":"default","tag":"Endpoints","count":20},{"language":"default","tag":"Bulk Export","count":17},{"language":"default","tag":"Integrations","count":14}]},"assistantConfig":{},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"comment-mode","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":":root{--primary: 103 101 232;--primary-light: 225 224 250;--primary-dark: 103 101 232;--background-light: 255 255 255;--background-dark: 9 13 13;--gray-50: 243 247 246;--gray-100: 238 242 241;--gray-200: 222 226 226;--gray-300: 206 210 209;--gray-400: 158 163 162;--gray-500: 112 116 115;--gray-600: 80 84 83;--gray-700: 62 67 66;--gray-800: 37 41 40;--gray-900: 23 27 26;--gray-950: 10 14 13;--header: 128 127 236;--hover-btn: 52 51 116;--accent: 103 101 232}header#header>div>div{color:rgb(var(--header))}body :is(.dark\\:bg-primary-light:is(.dark *)){background:rgb(var(--accent))}body :is(.dark\\:bg-primary-light\\/10:is(.dark *)){background:rgb(var(--hover-btn))}"}],"page":{"pagePath":"developer/installation/mobile/capacitor/installation","slug":"/developer/installation/mobile/capacitor/installation","pageMetadata":{"title":"Ionic Capacitor plugin","sidebarTitle":"Installation","description":"Install Userpilot on Ionic-Capacitor Application","keywords":["Userpilot","Capacitor","Mobile","SDK","Installation","Setup","developer"],"href":"/developer/installation/mobile/capacitor/installation"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Install Userpilot on Ionic-Capacitor Application\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,hr:`hr`,li:`li`,ol:`ol`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Table,Tip,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Tip)_missingMdxReference(`Tip`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`Userpilot Capacitor Plugin enables you to capture user insights and deliver personalized in-app experiences in real time. With just a one-time setup, you can immediately begin leveraging Userpilot’s analytics and engagement features to understand user behaviors and guide their journeys in-app.`}),`\n`,_jsx(_components.p,{children:`This document provides a step-by-step walkthrough of the installation and initialization process, as well as instructions on using the SDK’s public APIs.`}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`prerequisites`,children:`Prerequisites`}),`\n`,_jsx(Heading,{level:`4`,id:`android`,children:`Android`}),`\n`,_jsxs(_components.p,{children:[`Your application’s `,_jsx(_components.code,{children:`build.gradle`}),` must have a `,_jsx(_components.code,{children:`compileSdk`}),` of 35+ and `,_jsx(_components.code,{children:`minSdk`}),` of 23+. Your project should use the Android Gradle Plugin (AGP) version 8.6+.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`7`,language:`kotlin`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`kotlin`,children:_jsxs(_components.code,{language:`kotlin`,numberOfLines:`7`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`android`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` compileSdk `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`35`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` defaultConfig`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` minSdk `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`23`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`4`,id:`ios`,children:`iOS`}),`\n`,_jsx(_components.p,{children:`Your application must target iOS 13+ to install the SDK, Update the iOS project xcodeproj to set the deployment target, if needed. In the application’s Podfile, include at least this minimum version.`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Podfile`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`platform`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` :ios,`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '14.0'`})]}),`\n`]})})}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`installation`,children:`Installation`}),`\n`,_jsx(_components.p,{children:`Add the Userpilot Capacitor Plugin dependency to your application.`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`In your app’s root directory, install the Userpilot Capacitor Plugin. You can fetch the latest version from `,_jsx(_components.a,{href:`https://www.npmjs.com/package/@userpilot/capacitor`,children:`here`}),`. Release notes are available `,_jsx(_components.a,{href:`/developer/installation/mobile/capacitor/mobile-capacitor-release-notes`,children:`here`}),`.`]}),`\n`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`npm`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` install`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` @userpilot/capacitor`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`npx`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` cap`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` sync`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`Userpilot supports CocoaPods and Swift Package Manager (SPM). Capacitor installs the native Userpilot dependency through the plugin, so you do not need to add it separately.`}),`\n`,_jsxs(_components.p,{children:[`To migrate an existing CocoaPods app or set up a new SPM project, follow `,_jsx(_components.a,{href:`/developer/installation/mobile/capacitor/updating-to-spm`,children:`Updating to Swift Package Manager`}),`.`]}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`initialization`,children:`Initialization`}),`\n`,_jsxs(_components.p,{children:[`To use Userpilot, initialize it once in your Application class. This ensures the SDK is ready as soon as your app starts. Update your Application class. Replace `,_jsx(_components.code,{children:`\u003cAPP_TOKEN>`}),` with your Application Token, which can be fetched from your `,_jsx(_components.a,{href:`https://run.userpilot.io/environment`,children:`Environments Page`}),`.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Userpilot`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '@userpilot/capacitor'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Userpilot`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`initialize`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({ `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`token:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'APP_TOKEN'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`config:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`logging:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } })`})]}),`\n`]})})}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`using-the-sdk`,children:`Using the SDK`}),`\n`,_jsx(_components.p,{children:`Once initialized, the SDK provides straightforward APIs for identifying users, tracking events, and screen views.`}),`\n`,_jsx(Heading,{level:`3`,id:`identifying-users`,children:`Identifying Users`}),`\n`,_jsx(_components.p,{children:`This API is used to identify unique users and companies (groups of users) and set their properties. Once identified, all subsequent tracked events and screens will be attributed to that user.`}),`\n`,_jsxs(Warning,{children:[_jsx(_components.p,{children:_jsx(_components.strong,{children:`Important`})}),_jsx(_components.p,{children:`It’s crucial to call the Userpilot identify function; without it, Userpilot won’t be able to recognize your users, and mobile content won’t be displayed to them.`})]}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`Recommended Usage:`})}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`On user authentication (login):`}),` Immediately call `,_jsx(_components.code,{children:`identify`}),` when a user signs in to establish their identity for all future events.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`On app launch for authenticated users:`}),` If the user has a valid authenticated session, call `,_jsx(_components.code,{children:`identify`}),` at app launch.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Upon property updates:`}),` Whenever user or company properties change.`]}),`\n`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`26`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`26`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// API`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`identify`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`options`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`IdentifyOptions`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Parameters`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`export`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` interface`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` IdentifyOptions`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` userId`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` string`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` properties`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`?:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` object`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` company`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`?:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` object`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Example`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`userpilot`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`identify`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` userId`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'\u003cUSER_ID>'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` properties`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'name'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` :`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'John Doe'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'email'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` :`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'user@example.com'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'created_at'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` :`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '2019-10-17'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'role'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` :`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Admin'`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }, `})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` company`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'id'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` :`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '\u003cCOMPANY_ID>'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'name'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Acme Labs'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'created_at'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '2019-10-17'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'plan'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` :`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Free'`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})}),`\n`]})})}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`Properties Guidelines`})}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Key `,_jsx(_components.code,{children:`id`}),` is required in company properties, to identify a unique company.`]}),`\n`,_jsx(_components.li,{children:`Userpilot supports String, Numeric, and Date types.`}),`\n`,_jsx(_components.li,{children:`Make sure you’re sending date values in ISO8601 format.`}),`\n`,_jsxs(_components.li,{children:[`If you are planning to use Userpilot’s localization features, make sure you are passing user property `,_jsx(_components.code,{children:`locale_code`}),` with a value that adheres to ISO 639-1 format.`]}),`\n`,_jsxs(_components.li,{children:[`Userpilot’s reserved properties’ have pre-determined types and improve profiles interface in the dashboard:`,`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Use key `,_jsx(_components.code,{children:`email`}),` to pass the user’s email.`]}),`\n`,_jsxs(_components.li,{children:[`Use key `,_jsx(_components.code,{children:`name`}),` to pass the user’s or company’s name.`]}),`\n`,_jsxs(_components.li,{children:[`Use key `,_jsx(_components.code,{children:`created_at`}),` to pass the user’s or company’s signed up date.`]}),`\n`]}),`\n`]}),`\n`]}),`\n`,_jsxs(Tip,{children:[_jsx(_components.p,{children:`Notes`}),_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Ensure the User ID source is consistent across Web, Android, and iOS.`}),`\n`,_jsx(_components.li,{children:`While properties are optional, setting them enhances Userpilot’s segmentation capabilities.`}),`\n`]})]}),`\n`,_jsx(Heading,{level:`3`,id:`tracking-screens-required`,children:`Tracking Screens (Required)`}),`\n`,_jsx(_components.p,{children:`Calling screen is crucial for unlocking Userpilot’s core engagement and analytics capabilities. When a user navigates to a particular screen, invoking screen records that view and triggers any eligible in-app experiences. Subsequent events are also attributed to the most recently tracked screen, providing context for richer analytical insights. For these reasons, we strongly recommend tracking all of your app’s screen views.`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`10`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`10`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// API`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`screen`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`options`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`ScreenOptions`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Parameters`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`export`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` interface`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` ScreenOptions`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` title`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` string`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Example`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Userpilot`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`screen`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({ `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`title:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Profile'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` })`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`tracking-events`,children:`Tracking Events`}),`\n`,_jsx(_components.p,{children:`Log any meaningful action the user performs. Events can be button clicks, form submissions, or any custom activity you want to analyze. Optionally, you can pass metadata with the event to provide specific context.`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`11`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`11`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// API`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`track`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`options`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`TrackOptions`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Parameters`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`export`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` interface`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` TrackOptions`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` name`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` string`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` properties`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`?:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` object`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Example`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Userpilot`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`track`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({ `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`name:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Added to Cart'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`properties:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'itemId'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` :`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'sku_456'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'price'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` :`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 29.99`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}})`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`logging-out`,children:`Logging Out`}),`\n`,_jsxs(_components.p,{children:[`When a user logs out, call `,_jsx(_components.code,{children:`logout()`}),` to clear the current user context. This ensures subsequent events are no longer associated with the previous user.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`userpilot`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`logout`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`()`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`anonymous-users`,children:`Anonymous Users`}),`\n`,_jsxs(_components.p,{children:[`If a user is not authenticated, call `,_jsx(_components.code,{children:`anonymous()`}),` to track events without a user ID. This is useful for pre-signup flows or guest user sessions.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`userpilot`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`anonymous`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`()`})]}),`\n`]})})}),`\n`,_jsx(Warning,{children:_jsx(_components.p,{children:`Anonymous users count towards your Monthly Active Users usage. Consider your MAU limits before using this API.`})}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`experience`,children:`Experience`}),`\n`,_jsx(_components.p,{children:`Triggers a specific experience programmatically using it’s ID. This API allows you to manually initiate an experience within your application.`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`10`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`10`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// API`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`triggerExperience`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`options`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`ShowOptions`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Parameters`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`export`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` interface`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` ShowOptions`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` experienceId`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` string`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Example`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`userpilot`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`triggerExperience`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({ `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`experienceId:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '\u003cEXPERIENCE_ID>'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` })`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`To end current active experience`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`userpilot`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`endExperience`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`()`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`configuration-optional`,children:`Configuration (Optional)`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:_jsx(_components.strong,{children:`Parameter`})}),_jsx(_components.th,{children:_jsx(_components.strong,{children:`Type`})}),_jsx(_components.th,{children:_jsx(_components.strong,{children:`Description`})})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`logging`}),_jsx(_components.td,{children:`Boolean`}),_jsxs(_components.td,{children:[`Enable or disable logs for the SDK.`,_jsx(`br`,{}),_jsx(`br`,{}),_jsx(_components.strong,{children:`Default: false`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`disableRequestPushNotificationsPermission`}),_jsx(_components.td,{children:`Boolean`}),_jsxs(_components.td,{children:[`Disable push notifications permission request by the SDK.`,_jsx(`br`,{}),_jsx(`br`,{}),_jsx(_components.strong,{children:`Default: false`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`useInAppBrowser`}),_jsx(_components.td,{children:`Boolean`}),_jsxs(_components.td,{children:[`Determines whether to open URLs inside CustomTabsIntent/SFSafariViewController or use the system browser.`,_jsx(`br`,{}),_jsx(`br`,{}),_jsx(_components.strong,{children:`Default: false`})]})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`privacy-manifest`,children:`Privacy Manifest`}),`\n`,_jsxs(_components.p,{children:[`This plugin uses the native Userpilot iOS SDK. When you ship to the App Store, follow the iOS `,_jsx(_components.a,{href:`/developer/installation/mobile/ios/installation#privacy-manifest`,children:`Privacy Manifest`}),` guidance.`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Ionic Capacitor plugin","sidebarTitle":"Installation","description":"Install Userpilot on Ionic-Capacitor Application","keywords":["Userpilot","Capacitor","Mobile","SDK","Installation","Setup","developer"],"href":"/developer/installation/mobile/capacitor/installation"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Prerequisites","slug":"prerequisites","depth":2,"children":[{"title":"Android","slug":"android","depth":4,"children":[]},{"title":"iOS","slug":"ios","depth":4,"children":[]}]},{"title":"Installation","slug":"installation","depth":2,"children":[]},{"title":"Initialization","slug":"initialization","depth":2,"children":[]},{"title":"Using the SDK","slug":"using-the-sdk","depth":2,"children":[{"title":"Identifying Users","slug":"identifying-users","depth":3,"children":[]},{"title":"Tracking Screens (Required)","slug":"tracking-screens-required","depth":3,"children":[]},{"title":"Tracking Events","slug":"tracking-events","depth":3,"children":[]},{"title":"Logging Out","slug":"logging-out","depth":3,"children":[]},{"title":"Anonymous Users","slug":"anonymous-users","depth":3,"children":[]}]},{"title":"Experience","slug":"experience","depth":2,"children":[]},{"title":"Configuration (Optional)","slug":"configuration-optional","depth":2,"children":[]},{"title":"Privacy Manifest","slug":"privacy-manifest","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/userpilot/3ace2e9458eac66f/.prettierrc.js","/_mintlify/custom/userpilot/27d7e6557bc674e7/plausible.js","/_mintlify/custom/userpilot/222114e09e9d43ba/scripts/generate-kb-manifest.js","/_mintlify/custom/userpilot/7588c52f105b4ce6/scripts/check-nav.js","/_mintlify/custom/userpilot/77c4aabf1776912c/scripts/check-redirects.js","/_mintlify/custom/userpilot/c4efe6226e95d900/scripts/lib/docs-lib.js","/_mintlify/custom/userpilot/8278790c2c1428e5/scripts/precommit.js","/_mintlify/custom/userpilot/826df8c2727af7c1/scripts/seo-audit.js"],"subdomain":"userpilot","siteName":"Userpilot Knowledge Base","title":"Ionic Capacitor plugin - Userpilot Knowledge Base","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-09-29T13:13:12.409Z","originalFileLocation":"developer/installation/mobile/capacitor/installation.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Install Userpilot on Ionic-Capacitor Application\">\u003cmeta data-mint-head name=\"application-name\" content=\"Userpilot Knowledge Base\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/userpilot/aR1cLyV1TsYivBqB/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/userpilot/aR1cLyV1TsYivBqB/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/userpilot/aR1cLyV1TsYivBqB/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/userpilot/aR1cLyV1TsYivBqB/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/userpilot/aR1cLyV1TsYivBqB/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/userpilot/aR1cLyV1TsYivBqB/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/userpilot/aR1cLyV1TsYivBqB/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/userpilot/aR1cLyV1TsYivBqB/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/userpilot/aR1cLyV1TsYivBqB/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Ionic Capacitor plugin - Userpilot Knowledge Base\">\u003cmeta data-mint-head property=\"og:description\" content=\"Install Userpilot on Ionic-Capacitor Application\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Userpilot Knowledge Base\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.userpilot.com/developer/installation/mobile/capacitor/installation\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://docs.userpilot.com/up-logo-dark.svg\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Ionic Capacitor plugin - Userpilot Knowledge Base\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Install Userpilot on Ionic-Capacitor Application\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://docs.userpilot.com/up-logo-dark.svg\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/userpilot/aR1cLyV1TsYivBqB/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Userpilot Knowledge Base\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#6765e8\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.userpilot.com/developer/installation/mobile/capacitor/installation\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/developer/installation/mobile/capacitor/installation.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.userpilot.com/#organization\",\"name\":\"Userpilot Knowledge Base\",\"url\":\"https://docs.userpilot.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/userpilot/KtUQBkEo7Hf3bjCu/up-logo-dark.svg?fit=max\u0026auto=format\u0026n=KtUQBkEo7Hf3bjCu\u0026q=85\u0026s=ed5988b05e17770537d7327506be349c\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.userpilot.com#website\",\"name\":\"Userpilot Knowledge Base\",\"url\":\"https://docs.userpilot.com\",\"publisher\":{\"@id\":\"https://docs.userpilot.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.userpilot.com/developer/installation/mobile/capacitor/installation#webpage\",\"url\":\"https://docs.userpilot.com/developer/installation/mobile/capacitor/installation\",\"name\":\"Ionic Capacitor plugin\",\"description\":\"Install Userpilot on Ionic-Capacitor Application\",\"dateModified\":\"2026-09-29T13:13:12.409Z\",\"isPartOf\":{\"@id\":\"https://docs.userpilot.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.userpilot.com/developer/installation/mobile/capacitor/installation#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.userpilot.com/developer/installation/mobile/capacitor/installation#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Installation\",\"item\":\"https://docs.userpilot.com/developer/installation/web\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Mobile\",\"item\":\"https://docs.userpilot.com/developer/installation/mobile/overview\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Ionic Capacitor plugin\",\"item\":\"https://docs.userpilot.com/developer/installation/mobile/capacitor/installation\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.userpilot.com/developer/installation/mobile/capacitor/installation#article\",\"headline\":\"Ionic Capacitor plugin\",\"name\":\"Ionic Capacitor plugin\",\"description\":\"Install Userpilot on Ionic-Capacitor Application\",\"url\":\"https://docs.userpilot.com/developer/installation/mobile/capacitor/installation\",\"mainEntityOfPage\":{\"@id\":\"https://docs.userpilot.com/developer/installation/mobile/capacitor/installation#webpage\"},\"image\":\"https://docs.userpilot.com/up-logo-dark.svg\",\"dateModified\":\"2026-09-29T13:13:12.409Z\",\"keywords\":\"Userpilot, Capacitor, Mobile, SDK, Installation, Setup, developer\",\"publisher\":{\"@id\":\"https://docs.userpilot.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.userpilot.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Userpilot Knowledge Base\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Userpilot Knowledge Base","nav":{"global":null,"tabs":[{"tab":"Platform","pages":[{"title":"Platform","href":"/getting-started/what-is-userpilot"}]},{"tab":"Integrations","pages":[{"title":"Integrations","href":"/integrations/overview"}]},{"tab":"Developer","groups":[{"group":"Installation","icon":"gear-code","pages":[{"group":"Web","pages":[{"title":"Web Installation","sidebarTitle":"Overview","href":"/developer/installation/web"},{"title":"Agent SDK Installation","sidebarTitle":"Agents SDK","href":"/agent-sdk-installation"},{"group":"SDK Settings","icon":"sliders","pages":[{"title":"Callbacks","href":"/developer/installation/sdk/settings/callbacks"},{"title":"Integrations Interfaces","sidebarTitle":"Integration Interfaces","href":"/developer/installation/sdk/settings/integrations_interfaces"},{"title":"Auto-Capture Privacy Settings","href":"/developer/installation/sdk/settings/privacy"}]}]},{"group":"Mobile","pages":[{"title":"Install Userpilot Mobile SDK","sidebarTitle":"Overview","href":"/developer/installation/mobile/overview"},{"title":"Mobile Autocapture Screen Migration","href":"/developer/installation/mobile/mobile-autocapture-screen-migration"},{"group":"iOS","pages":[{"title":"iOS SDK","sidebarTitle":"Installation","href":"/developer/installation/mobile/ios/installation"},{"title":"Callbacks","href":"/developer/installation/mobile/ios/callbacks"},{"title":"Push Notifications","href":"/developer/installation/mobile/ios/push-notifications"},{"title":"Custom URL Scheme","href":"/developer/installation/mobile/ios/custom_scheme"},{"title":"Auto Capture","href":"/developer/installation/mobile/ios/auto-capture"},{"title":"Multi-Instance","href":"/developer/installation/mobile/ios/multi-instance"},{"title":"Fonts","href":"/developer/installation/mobile/ios/fonts"},{"title":"Userpilot SDK features","sidebarTitle":"Features","href":"/developer/installation/mobile/ios/features"},{"title":"Userpilot iOS SDK Release Notes","href":"/developer/installation/mobile/ios/mobile-ios-release-notes"}]},{"group":"Android","pages":[{"title":"Android SDK","sidebarTitle":"Installation","href":"/developer/installation/mobile/android/installation"},{"title":"Callbacks","href":"/developer/installation/mobile/android/callbacks"},{"title":"Push Notifications","href":"/developer/installation/mobile/android/push-notifications"},{"title":"Custom URL Scheme","href":"/developer/installation/mobile/android/custom_scheme"},{"title":"Auto Capture","href":"/developer/installation/mobile/android/auto-capture"},{"title":"Multi-Instance","href":"/developer/installation/mobile/android/multi-instance"},{"title":"Fonts","href":"/developer/installation/mobile/android/fonts"},{"title":"Userpilot SDK features","sidebarTitle":"Features","href":"/developer/installation/mobile/android/features"},{"title":"Userpilot Android SDK Release Notes","href":"/developer/installation/mobile/android/mobile-android-release-notes"}]},{"group":"Flutter","pages":[{"title":"Flutter Plugin","sidebarTitle":"Installation","href":"/developer/installation/mobile/flutter/installation"},{"title":"Updating to Swift Package Manager","sidebarTitle":"Updating to SPM","href":"/developer/installation/mobile/flutter/updating-to-spm"},{"title":"Callbacks","href":"/developer/installation/mobile/flutter/callbacks"},{"title":"Push Notifications","href":"/developer/installation/mobile/flutter/push-notifications"},{"title":"Custom URL Scheme","href":"/developer/installation/mobile/flutter/custom_scheme"},{"title":"Auto Capture","href":"/developer/installation/mobile/flutter/auto-capture"},{"title":"Fonts","href":"/developer/installation/mobile/flutter/fonts"},{"title":"Userpilot SDK features","sidebarTitle":"Features","href":"/developer/installation/mobile/flutter/features"},{"title":"Userpilot Flutter SDK Release Notes","href":"/developer/installation/mobile/flutter/mobile-flutter-release-notes"}]},{"group":"React Native","pages":[{"title":"React Native Module","sidebarTitle":"Installation","href":"/developer/installation/mobile/react-native/installation"},{"title":"Callbacks","href":"/developer/installation/mobile/react-native/callbacks"},{"title":"Push Notifications","href":"/developer/installation/mobile/react-native/push-notifications"},{"title":"Custom URL Scheme","href":"/developer/installation/mobile/react-native/custom_scheme"},{"title":"Auto Capture","href":"/developer/installation/mobile/react-native/auto-capture"},{"title":"Auto Screen Tracking With React Navigation","href":"/developer/installation/mobile/react-native/auto-track-screens"},{"title":"Fonts","href":"/developer/installation/mobile/react-native/fonts"},{"title":"Userpilot React Native with Expo","href":"/developer/installation/mobile/react-native/expo"},{"title":"Custom URL Scheme with Expo","sidebarTitle":"Expo Custom URL Scheme","href":"/developer/installation/mobile/react-native/expo_custom_scheme"},{"title":"Expo","href":"/developer/installation/mobile/mobile-expo-push-notification"},{"title":"Custom Fonts with Expo","href":"/developer/installation/mobile/react-native/expo_custom_fonts"},{"title":"Userpilot SDK features","sidebarTitle":"Features","href":"/developer/installation/mobile/react-native/features"},{"title":"Userpilot React Native SDK Release Notes","description":"Release history for the Userpilot React Native mobile SDK.","href":"/developer/installation/mobile/react-native/mobile-react-native-release-notes"}]},{"group":"Capacitor","pages":[{"title":"Ionic Capacitor plugin","sidebarTitle":"Installation","href":"/developer/installation/mobile/capacitor/installation"},{"title":"Updating to Swift Package Manager","sidebarTitle":"Updating to SPM","description":"Migrate your Userpilot Capacitor app from CocoaPods to Swift Package Manager, complete Xcode setup, and verify native SDK dependencies.","href":"/developer/installation/mobile/capacitor/updating-to-spm"},{"title":"Callbacks","href":"/developer/installation/mobile/capacitor/callbacks"},{"title":"Push Notifications","href":"/developer/installation/mobile/capacitor/push-notifications"},{"title":"Custom URL Scheme","href":"/developer/installation/mobile/capacitor/custom_scheme"},{"title":"Auto Capture","href":"/developer/installation/mobile/capacitor/auto-capture"},{"title":"Fonts","href":"/developer/installation/mobile/capacitor/fonts"},{"title":"Userpilot SDK features","sidebarTitle":"Features","href":"/developer/installation/mobile/capacitor/features"},{"title":"Userpilot Capacitor SDK Release Notes","href":"/developer/installation/mobile/capacitor/mobile-capacitor-release-notes"}]},{"group":"Cordova","pages":[{"title":"Cordova plugin","sidebarTitle":"Installation","href":"/developer/installation/mobile/cordova/installation"},{"title":"Callbacks","href":"/developer/installation/mobile/cordova/callbacks"},{"title":"Push Notifications","href":"/developer/installation/mobile/cordova/push-notifications"},{"title":"Custom URL Scheme","href":"/developer/installation/mobile/cordova/custom_scheme"},{"title":"Auto Capture","href":"/developer/installation/mobile/cordova/auto-capture"},{"title":"Userpilot SDK features","sidebarTitle":"Features","href":"/developer/installation/mobile/cordova/features"},{"title":"Userpilot Cordova SDK Release Notes","href":"/developer/installation/mobile/cordova/mobile-cordova-release-notes"}]},{"group":"MAUI","pages":[{"title":"MAUI SDK","sidebarTitle":"Installation","href":"/developer/installation/mobile/maui/installation"},{"title":"Callbacks","href":"/developer/installation/mobile/maui/callbacks"},{"title":"Push Notifications","href":"/developer/installation/mobile/maui/push-notifications"},{"title":"Custom URL Scheme","href":"/developer/installation/mobile/maui/custom_scheme"},{"title":"Auto Capture","href":"/developer/installation/mobile/maui/auto-capture"},{"title":"Userpilot SDK features","sidebarTitle":"Features","href":"/developer/installation/mobile/maui/features"},{"title":"Userpilot MAUI SDK Release Notes","href":"/developer/installation/mobile/maui/mobile-maui-release-notes"}]},{"group":"Segment","pages":[{"title":"Analytics iOS Userpilot","href":"/developer/mobile-segment/mobile-segment-ios"},{"title":"Analytics Kotlin Userpilot","href":"/developer/mobile-segment/mobile-segment-android"},{"title":"Analytics ReactNative Userpilot","href":"/developer/mobile-segment/mobile-segment-react-native"}]}]},{"title":"Production and Staging Evironments","sidebarTitle":"Production and Staging","href":"/developer/installation/production-staging"},{"title":"Self-hosting the SDK","href":"/developer/installation/self-host"},{"title":"Anonymous Users","href":"/developer/installation/anonymous-user"}]},{"group":"Security","icon":"lock","pages":[{"title":"Content Security Policy (CSP)","sidebarTitle":"Content Security Policy ","href":"/developer/security/csp"},{"title":"Subresource Integrity (SRI)","href":"/developer/security/sri"}]},{"group":"Data sync","icon":"users","pages":[{"title":"Data sync overview","sidebarTitle":"Overview","href":"/data-sync/overview"},{"title":"Prerequisites","sidebarTitle":"Prerequisites","href":"/data-sync/prerequisites"},{"title":"Understanding Your Data","sidebarTitle":"Understanding Your Data","href":"/data-sync/understand-data"},{"title":"Event Schema","sidebarTitle":"Event Schema","href":"/data-sync/event-schema"},{"title":"Setup and configuration","sidebarTitle":"Setup and configuration","href":"/data-sync/setup-and-configuration"},{"title":"Troubleshooting","sidebarTitle":"Troubleshooting","href":"/data-sync/troubleshooting"},{"title":"Frequently Asked Questions","sidebarTitle":"FAQ","href":"/data-sync/faq"}]},{"group":"Advanced","pages":[{"title":"JavaScript SDK","href":"/developer/installation/SDK-APIs"},{"title":"Identify vs Reload","href":"/developer/identify-vs-reload"},{"title":"Custom Domain Hosting","href":"/developer/custom-domain"}]}]},{"tab":"APIs","pages":[{"title":"APIs","href":"/api-references/overview"}]}]},"basePath":"","title":"Ionic Capacitor plugin - Userpilot Knowledge Base","buildId":"dpl_DTau1J5HqS9UTgVSDwGksstFWtPa","deploymentId":"dpl_DTau1J5HqS9UTgVSDwGksstFWtPa","dynamics":[],"chunks":[]}