{"_id":"@capawesome/capacitor-install-referrer","_rev":"4-cda339d98224594d116d5d5cde32e88d","name":"@capawesome/capacitor-install-referrer","dist-tags":{"latest":"0.1.2"},"versions":{"0.0.1":{"name":"@capawesome/capacitor-install-referrer","version":"0.0.1","keywords":["capacitor","plugin","native"],"author":{"name":"Robin Genz","email":"mail@robingenz.dev"},"license":"MIT","_id":"@capawesome/capacitor-install-referrer@0.0.1","maintainers":[{"name":"robingenz","email":"mail@robingenz.dev"}],"homepage":"https://capawesome.io/docs/plugins/install-referrer/","bugs":{"url":"https://github.com/capawesome-team/capacitor-plugins/issues"},"dist":{"shasum":"3fd5f3eb7d2b352d0071a2b520a1acbfefaa11e0","tarball":"https://registry.npmjs.org/@capawesome/capacitor-install-referrer/-/capacitor-install-referrer-0.0.1.tgz","fileCount":36,"integrity":"sha512-Wg8+LP5OfVgvQTf6p53UGIXkpkUGPhF/TmkiMPGOEfVUmBGUZYQsc65BfeF/E3hsO6vCBsRJKLR0ho9W+UQsCw==","signatures":[{"sig":"MEUCIQC95xb4eesztYTIQ7wU1opbMhyQqRbiACF5l8KB5ebXgwIgXDgS2Wd/pvhLJW9ZjnP822pgikjQFYCIeGzx8hKeKM0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":49801},"main":"dist/plugin.cjs.js","types":"dist/esm/index.d.ts","unpkg":"dist/plugin.js","module":"dist/esm/index.js","funding":[{"url":"https://github.com/sponsors/capawesome-team/","type":"github"},{"url":"https://opencollective.com/capawesome","type":"opencollective"}],"gitHead":"8dd31ce5d3f16f94fb71d033f47512e99908f4e4","scripts":{"fmt":"npm run eslint -- --fix && npm run prettier -- --write && npm run swiftlint -- --fix --format","lint":"npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint","build":"npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs","clean":"rimraf ./dist","watch":"tsc --watch","docgen":"docgen --api InstallReferrerPlugin --output-readme README.md --output-json dist/docs.json","eslint":"eslint . --ext ts","verify":"npm run verify:ios && npm run verify:android && npm run verify:web","prettier":"prettier \"**/*.{css,html,ts,js,java}\"","swiftlint":"node-swiftlint","verify:ios":"cd ios && pod install && xcodebuild -workspace Plugin.xcworkspace -scheme Plugin -destination generic/platform=iOS && cd ..","verify:web":"npm run build","prepublishOnly":"npm run build","verify:android":"cd android && ./gradlew clean build test && cd ..","ios:pod:install":"cd ios && pod install --repo-update && cd ..","ios:spm:install":"cd ios && swift package resolve && cd .."},"_npmUser":{"name":"robingenz","email":"mail@robingenz.dev"},"capacitor":{"ios":{"src":"ios"},"android":{"src":"android"}},"repository":{"url":"git+https://github.com/capawesome-team/capacitor-plugins.git","type":"git"},"_npmVersion":"11.13.0","description":"Capacitor plugin for reading install attribution data.","directories":{},"_nodeVersion":"24.16.0","eslintConfig":{"extends":"@ionic/eslint-config/recommended"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"8.57.0","rimraf":"6.1.2","rollup":"4.53.3","swiftlint":"2.0.0","typescript":"5.9.3","@capacitor/cli":"8.0.0","@capacitor/ios":"8.0.0","@capacitor/core":"8.0.0","@capacitor/docgen":"0.3.1","@capacitor/android":"8.0.0","@ionic/eslint-config":"0.4.0","prettier-plugin-java":"2.6.7"},"peerDependencies":{"@capacitor/core":">=8.0.0"},"_npmOperationalInternal":{"tmp":"tmp/capacitor-install-referrer_0.0.1_1783405266120_0.6214254668608012","host":"s3://npm-registry-packages-npm-production"}},"0.1.0":{"name":"@capawesome/capacitor-install-referrer","version":"0.1.0","keywords":["capacitor","plugin","native","capacitor-plugin","install referrer","play install referrer","install attribution","apple ad services","apple search ads","attribution token","campaign tracking","deferred deep linking"],"author":{"name":"Robin Genz","email":"mail@robingenz.dev"},"license":"MIT","_id":"@capawesome/capacitor-install-referrer@0.1.0","maintainers":[{"name":"robingenz","email":"mail@robingenz.dev"}],"homepage":"https://capawesome.io/docs/sdks/capacitor/install-referrer/","bugs":{"url":"https://github.com/capawesome-team/capacitor-plugins/issues"},"dist":{"shasum":"5d629bf0d21b4500d07cb7d6173cfb13d65dd9be","tarball":"https://registry.npmjs.org/@capawesome/capacitor-install-referrer/-/capacitor-install-referrer-0.1.0.tgz","fileCount":36,"integrity":"sha512-yrYR2N+Qev8dmrFvHk5qvOvk9zjeFyJ+euKR+X661DYOp76TdKrTBPl536KhGXwkxJ8mYCBgIw3Yzeia94fDKQ==","signatures":[{"sig":"MEQCICkvjin/XfeWyH5a1JCzRFLF+R9ypuk5Ezg3iFDh8ZZtAiA+8laGXo2djMWHrotcOjGAaITwRAgBo0GLSAt+EQrWyQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@capawesome%2fcapacitor-install-referrer@0.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":54264},"main":"dist/plugin.cjs.js","types":"dist/esm/index.d.ts","unpkg":"dist/plugin.js","module":"dist/esm/index.js","funding":[{"url":"https://github.com/sponsors/capawesome-team/","type":"github"},{"url":"https://opencollective.com/capawesome","type":"opencollective"}],"gitHead":"1ce17b1fd14c43b2f1d5d3c2da82221e1d1dca37","scripts":{"fmt":"npm run eslint -- --fix && npm run prettier -- --write && npm run swiftlint -- --fix --format","lint":"npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint","build":"npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs","clean":"rimraf ./dist","watch":"tsc --watch","docgen":"docgen --api InstallReferrerPlugin --output-readme README.md --output-json dist/docs.json","eslint":"eslint . --ext ts","verify":"npm run verify:ios && npm run verify:android && npm run verify:web","prettier":"prettier \"**/*.{css,html,ts,js,java}\"","swiftlint":"node-swiftlint","verify:ios":"cd ios && pod install && xcodebuild -workspace Plugin.xcworkspace -scheme Plugin -destination generic/platform=iOS && cd ..","verify:web":"npm run build","prepublishOnly":"npm run build","verify:android":"cd android && ./gradlew clean build test && cd ..","ios:pod:install":"cd ios && pod install --repo-update && cd ..","ios:spm:install":"cd ios && swift package resolve && cd .."},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:3a76194a-bd06-4b78-9e49-ddb73ac45efd"}},"capacitor":{"ios":{"src":"ios"},"android":{"src":"android"}},"repository":{"url":"git+https://github.com/capawesome-team/capacitor-plugins.git","type":"git"},"_npmVersion":"11.16.0","description":"Capacitor plugin for reading install attribution data on Android and iOS.","directories":{},"_nodeVersion":"24.18.0","eslintConfig":{"extends":"@ionic/eslint-config/recommended"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"8.57.0","rimraf":"6.1.2","rollup":"4.53.3","swiftlint":"2.0.0","typescript":"5.9.3","@capacitor/cli":"8.0.0","@capacitor/ios":"8.0.0","@capacitor/core":"8.0.0","@capacitor/docgen":"0.3.1","@capacitor/android":"8.0.0","@ionic/eslint-config":"0.4.0","prettier-plugin-java":"2.6.7"},"peerDependencies":{"@capacitor/core":">=8.0.0"},"_npmOperationalInternal":{"tmp":"tmp/capacitor-install-referrer_0.1.0_1784015543658_0.5103894011167311","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@capawesome/capacitor-install-referrer","version":"0.1.1","keywords":["capacitor","plugin","native","capacitor-plugin","install referrer","play install referrer","install attribution","apple ad services","apple search ads","attribution token","campaign tracking","deferred deep linking"],"author":{"name":"Robin Genz","email":"mail@robingenz.dev"},"license":"MIT","_id":"@capawesome/capacitor-install-referrer@0.1.1","maintainers":[{"name":"robingenz","email":"mail@robingenz.dev"}],"homepage":"https://capawesome.io/docs/sdks/capacitor/install-referrer/","bugs":{"url":"https://github.com/capawesome-team/capacitor-plugins/issues"},"dist":{"shasum":"d5d6e4c1df1d6414de82f77e34e1dcfdfb1f6058","tarball":"https://registry.npmjs.org/@capawesome/capacitor-install-referrer/-/capacitor-install-referrer-0.1.1.tgz","fileCount":36,"integrity":"sha512-//iflsyd3aIpFCr4z+iTCNNCmzwu+wRSKCmSbOddj8z/oVz+2DRGK2M/iqKHstRcXkFlY6FLBACIgspx1mkm3g==","signatures":[{"sig":"MEUCIQC89FgRD0RDpnAmE+G/rlKSi2weMYAHGiCevJ0I3X1hKgIgOoYIhQ9J/NacRlxmqIkfoAdn13XvYf5sfut6ziwJbfg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@capawesome%2fcapacitor-install-referrer@0.1.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":54273},"main":"dist/plugin.cjs.js","types":"dist/esm/index.d.ts","unpkg":"dist/plugin.js","module":"dist/esm/index.js","funding":[{"url":"https://github.com/sponsors/capawesome-team/","type":"github"},{"url":"https://opencollective.com/capawesome","type":"opencollective"}],"gitHead":"3e61f4b412f9f3f512c21169bb135bbb23a67e6d","scripts":{"fmt":"npm run eslint -- --fix && npm run prettier -- --write && npm run swiftlint -- --fix --format","lint":"npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint","build":"npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs","clean":"rimraf ./dist","watch":"tsc --watch","docgen":"docgen --api InstallReferrerPlugin --output-readme README.md --output-json dist/docs.json","eslint":"eslint . --ext ts","verify":"npm run verify:ios && npm run verify:android && npm run verify:web","prettier":"prettier \"**/*.{css,html,ts,js,java}\"","swiftlint":"node-swiftlint","verify:ios":"cd ios && pod install && xcodebuild -workspace Plugin.xcworkspace -scheme Plugin -destination generic/platform=iOS && cd ..","verify:web":"npm run build","prepublishOnly":"npm run build","verify:android":"cd android && ./gradlew clean build test && cd ..","ios:pod:install":"cd ios && pod install --repo-update && cd ..","ios:spm:install":"cd ios && swift package resolve && cd .."},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:3a76194a-bd06-4b78-9e49-ddb73ac45efd"}},"capacitor":{"ios":{"src":"ios"},"android":{"src":"android"}},"repository":{"url":"git+https://github.com/capawesome-team/capacitor-plugins.git","type":"git"},"_npmVersion":"11.16.0","description":"Capacitor plugin for reading install attribution data on Android and iOS.","directories":{},"_nodeVersion":"24.18.0","eslintConfig":{"extends":"@ionic/eslint-config/recommended"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"8.57.0","rimraf":"6.1.2","rollup":"4.53.3","swiftlint":"2.0.0","typescript":"5.9.3","@capacitor/cli":"8.0.0","@capacitor/ios":"8.0.0","@capacitor/core":"8.0.0","@capacitor/docgen":"0.3.1","@capacitor/android":"8.0.0","@ionic/eslint-config":"0.4.0","prettier-plugin-java":"2.6.7"},"peerDependencies":{"@capacitor/core":">=8.0.0"},"_npmOperationalInternal":{"tmp":"tmp/capacitor-install-referrer_0.1.1_1784103000171_0.34028790886467863","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@capawesome/capacitor-install-referrer","version":"0.1.2","description":"Capacitor plugin for reading install attribution data on Android and iOS.","main":"dist/plugin.cjs.js","module":"dist/esm/index.js","types":"dist/esm/index.d.ts","unpkg":"dist/plugin.js","author":{"name":"Robin Genz","email":"mail@robingenz.dev"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/capawesome-team/capacitor-plugins.git"},"bugs":{"url":"https://github.com/capawesome-team/capacitor-plugins/issues"},"funding":[{"type":"github","url":"https://github.com/sponsors/capawesome-team/"},{"type":"opencollective","url":"https://opencollective.com/capawesome"}],"homepage":"https://capawesome.io/docs/sdks/capacitor/install-referrer/","keywords":["capacitor","plugin","native","capacitor-plugin","install referrer","play install referrer","install attribution","apple ad services","apple search ads","attribution token","campaign tracking","deferred deep linking"],"scripts":{"verify":"npm run verify:ios && npm run verify:android && npm run verify:web","verify:ios":"cd ios && pod install && xcodebuild -workspace Plugin.xcworkspace -scheme Plugin -destination generic/platform=iOS && cd ..","verify:android":"cd android && ./gradlew clean build test && cd ..","verify:web":"npm run build","lint":"npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint","fmt":"npm run eslint -- --fix && npm run prettier -- --write && npm run swiftlint -- --fix --format","eslint":"eslint . --ext ts","prettier":"prettier \"**/*.{css,html,ts,js,java}\"","swiftlint":"node-swiftlint","docgen":"docgen --api InstallReferrerPlugin --output-readme README.md --output-json dist/docs.json","build":"npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs","clean":"rimraf ./dist","watch":"tsc --watch","ios:pod:install":"cd ios && pod install --repo-update && cd ..","ios:spm:install":"cd ios && swift package resolve && cd ..","prepublishOnly":"npm run build"},"devDependencies":{"@capacitor/android":"8.0.0","@capacitor/cli":"8.4.2","@capacitor/core":"8.0.0","@capacitor/docgen":"0.3.1","@capacitor/ios":"8.0.0","@ionic/eslint-config":"0.4.0","eslint":"8.57.0","prettier-plugin-java":"2.9.7","rimraf":"6.1.2","rollup":"4.62.3","swiftlint":"2.0.0","typescript":"5.9.3"},"peerDependencies":{"@capacitor/core":">=8.0.0"},"eslintConfig":{"extends":"@ionic/eslint-config/recommended"},"capacitor":{"ios":{"src":"ios"},"android":{"src":"android"}},"publishConfig":{"access":"public"},"gitHead":"7c1937ed10b7de86ca2c1cdc3539a2735fd69a00","_id":"@capawesome/capacitor-install-referrer@0.1.2","_nodeVersion":"24.19.0","_npmVersion":"11.17.0","dist":{"integrity":"sha512-W9pKb3gJ0NQyMt6ujnYa3nVOhVEx5g5snSlogUrlLbcs60vNntEaXiMhdHIw7Fz34tyzRGNam+spVPxFoDgXtg==","shasum":"1f15b98ffb80010baf3b51ad92667d75ef37f067","tarball":"https://registry.npmjs.org/@capawesome/capacitor-install-referrer/-/capacitor-install-referrer-0.1.2.tgz","fileCount":36,"unpackedSize":54417,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@capawesome%2fcapacitor-install-referrer@0.1.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIHvU27DGRlHk/DtUopMnXo21oN8q7h7hB5saDTlbc/C/AiAyz6CdJeMwzKwKcltP3K0MiSE7dqgezF2qRAWVq5wFZw=="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:3a76194a-bd06-4b78-9e49-ddb73ac45efd"}},"directories":{},"maintainers":[{"name":"robingenz","email":"mail@robingenz.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/capacitor-install-referrer_0.1.2_1788337361532_0.3910170483029909"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-07T06:21:05.963Z","modified":"2026-09-02T08:22:42.041Z","0.0.1":"2026-07-07T06:21:06.266Z","0.1.0":"2026-07-14T07:52:23.798Z","0.1.1":"2026-07-15T08:10:00.308Z","0.1.2":"2026-09-02T08:22:41.675Z"},"bugs":{"url":"https://github.com/capawesome-team/capacitor-plugins/issues"},"author":{"name":"Robin Genz","email":"mail@robingenz.dev"},"license":"MIT","homepage":"https://capawesome.io/docs/sdks/capacitor/install-referrer/","keywords":["capacitor","plugin","native","capacitor-plugin","install referrer","play install referrer","install attribution","apple ad services","apple search ads","attribution token","campaign tracking","deferred deep linking"],"repository":{"type":"git","url":"git+https://github.com/capawesome-team/capacitor-plugins.git"},"description":"Capacitor plugin for reading install attribution data on Android and iOS.","maintainers":[{"name":"robingenz","email":"mail@robingenz.dev"}],"readme":"# Capacitor Install Referrer Plugin\n\nCapacitor plugin for reading install attribution data from the [Play Install Referrer](https://developer.android.com/google/play/installreferrer) and [Apple Ad Services](https://developer.apple.com/documentation/adservices).\n\n<div class=\"capawesome-z29o10a\">\n  <a href=\"https://cloud.capawesome.io/\" target=\"_blank\">\n    <img alt=\"Deliver Live Updates to your Capacitor app with Capawesome Cloud\" src=\"https://cloud.capawesome.io/assets/banners/cloud-build-and-deploy-capacitor-apps.png?t=1\" />\n  </a>\n</div>\n\n## Features\n\n- 🤖 **Play Install Referrer**: Read the Play Store install referrer on Android.\n- 🍏 **Apple Ad Services**: Read the Apple Ad Services attribution token on iOS.\n- 🤝 **Compatibility**: Works alongside the [App Tracking Transparency](https://capawesome.io/docs/sdks/capacitor/app-tracking-transparency/), [Firebase Analytics](https://capawesome.io/docs/sdks/capacitor/firebase/analytics/) and [PostHog](https://capawesome.io/docs/sdks/capacitor/posthog/) plugins.\n- 📦 **CocoaPods & SPM**: Supports CocoaPods and Swift Package Manager for iOS.\n- 🔁 **Up-to-date**: Always supports the latest Capacitor version.\n\nMissing a feature? Just [open an issue](https://github.com/capawesome-team/capacitor-plugins/issues) and we'll take a look!\n\n## Use Cases\n\nThe Install Referrer plugin is typically used to attribute app installs to marketing campaigns, for example:\n\n- **Campaign attribution**: Attribute Android installs to a campaign by reading the referrer URL of the installed package.\n- **Apple Search Ads measurement**: Measure iOS campaign performance by exchanging the Apple Ad Services attribution token server-side.\n- **Deferred deep linking**: Pass parameters through the Play Store referrer URL to route users to the right content after the first launch.\n- **Google Play Instant detection**: Detect whether the app was installed via a Google Play Instant experience within the past 7 days.\n\n## Compatibility\n\n| Plugin Version | Capacitor Version | Status         |\n| -------------- | ----------------- | -------------- |\n| 0.x.x          | >=8.x.x           | Active support |\n\n## Installation\n\nYou can use our **AI-Assisted Setup** to install the plugin.\nAdd the [Capawesome Skills](https://github.com/capawesome-team/skills) to your AI tool using the following command:\n\n```bash\nnpx skills add capawesome-team/skills --skill capacitor-plugins\n```\n\nThen use the following prompt:\n\n```\n Use the `capacitor-plugins` skill from `capawesome-team/skills` to install the `@capawesome/capacitor-install-referrer` plugin in my project.\n```\n\nIf you prefer **Manual Setup**, install the plugin by running the following commands and follow the platform-specific instructions below:\n\n```bash\nnpm install @capawesome/capacitor-install-referrer\nnpx cap sync\n```\n\nThe `getInstallReferrer(...)` method is only available on **Android**, the `getAttributionToken(...)` method is only available on **iOS**. On all other platforms, the respective method rejects as unimplemented.\n\n### Android\n\n#### Variables\n\nThis plugin will use the following project variables (defined in your app's `variables.gradle` file):\n\n- `$installReferrerVersion` version of `com.android.installreferrer:installreferrer` (default: `2.2`)\n\n## Configuration\n\nNo configuration required for this plugin.\n\n## Usage\n\nThe following examples show how to read the Play Store install referrer on Android and the Apple Ad Services attribution token on iOS.\n\n### Read the Play Store install referrer\n\nGet the Play Store install referrer information, including the referrer URL and the click and install timestamps. Fetch it once shortly after the first launch and persist it, since Google only guarantees its availability for a limited window after the install. Only available on Android:\n\n```typescript\nimport { InstallReferrer } from '@capawesome/capacitor-install-referrer';\n\nconst getInstallReferrer = async () => {\n  const result = await InstallReferrer.getInstallReferrer();\n  return result;\n};\n```\n\n### Read the Apple Ad Services attribution token\n\nGet the Apple Ad Services attribution token. The token is opaque and must be exchanged server-side with Apple's attribution API (see [Attribution Token Exchange](#attribution-token-exchange-ios)). Only available on iOS:\n\n```typescript\nimport { InstallReferrer } from '@capawesome/capacitor-install-referrer';\n\nconst getAttributionToken = async () => {\n  const { token } = await InstallReferrer.getAttributionToken();\n  return token;\n};\n```\n\n## API\n\n<docgen-index>\n\n* [`getAttributionToken()`](#getattributiontoken)\n* [`getInstallReferrer()`](#getinstallreferrer)\n* [Interfaces](#interfaces)\n\n</docgen-index>\n\n<docgen-api>\n<!--Update the source file JSDoc comments and rerun docgen to update the docs below-->\n\n### getAttributionToken()\n\n```typescript\ngetAttributionToken() => Promise<GetAttributionTokenResult>\n```\n\nGet the Apple Ad Services attribution token.\n\nThe token is opaque and only the client half of the attribution flow. It\nmust be exchanged server-side with Apple's Ad Services attribution API\n(`https://api-adservices.apple.com/api/v1/`) and expires after 24 hours.\n\nOnly available on iOS.\n\n**Returns:** <code>Promise&lt;<a href=\"#getattributiontokenresult\">GetAttributionTokenResult</a>&gt;</code>\n\n**Since:** 0.1.0\n\n--------------------\n\n\n### getInstallReferrer()\n\n```typescript\ngetInstallReferrer() => Promise<GetInstallReferrerResult>\n```\n\nGet the Play Store install referrer information.\n\nThe referrer should be fetched once shortly after the first launch and\npersisted by your app. Google only guarantees availability for a limited\nwindow after the install.\n\nOnly available on Android.\n\n**Returns:** <code>Promise&lt;<a href=\"#getinstallreferrerresult\">GetInstallReferrerResult</a>&gt;</code>\n\n**Since:** 0.1.0\n\n--------------------\n\n\n### Interfaces\n\n\n#### GetAttributionTokenResult\n\n| Prop        | Type                | Description                              | Since |\n| ----------- | ------------------- | ---------------------------------------- | ----- |\n| **`token`** | <code>string</code> | The Apple Ad Services attribution token. | 0.1.0 |\n\n\n#### GetInstallReferrerResult\n\n| Prop                               | Type                 | Description                                                                                | Since |\n| ---------------------------------- | -------------------- | ------------------------------------------------------------------------------------------ | ----- |\n| **`googlePlayInstantParam`**       | <code>boolean</code> | Whether the app was installed via a Google Play Instant experience within the past 7 days. | 0.1.0 |\n| **`installBeginTimestampMillis`**  | <code>number</code>  | The client-side timestamp (in milliseconds) when the app installation began.               | 0.1.0 |\n| **`referrerClickTimestampMillis`** | <code>number</code>  | The client-side timestamp (in milliseconds) when the referrer click happened.              | 0.1.0 |\n| **`referrerUrl`**                  | <code>string</code>  | The referrer URL of the installed package.                                                 | 0.1.0 |\n\n</docgen-api>\n\n## Install Referrer Window (Android)\n\nGoogle only guarantees that the Play Store install referrer is available for a limited window after the app is installed. You should fetch the referrer once shortly after the first launch and persist it in your app, so that it remains available later.\n\n## Attribution Token Exchange (iOS)\n\nThe token returned by `getAttributionToken(...)` is opaque and only the client half of the attribution flow. To resolve the attribution data, you must exchange the token server-side against Apple's Ad Services attribution API:\n\n```\nPOST https://api-adservices.apple.com/api/v1/\nContent-Type: text/plain\n\n<attribution-token>\n```\n\nThe token expires after 24 hours, so it should be exchanged promptly. See the [Apple documentation](https://developer.apple.com/documentation/adservices/aaattribution/attributiontoken()) for more information.\n\n## FAQ\n\n### How is this plugin different from other similar plugins?\n\nIt brings the Android Play Install Referrer and the iOS Apple Ad Services attribution token together under one fully typed API, so a single dependency covers install attribution across both platforms. It surfaces the complete referrer details — referrer URL, click and install timestamps, and Google Play Instant detection — and documents the Android availability window and the server-side Apple token exchange clearly. It's actively maintained against the latest Capacitor and OS versions, so campaign attribution and deferred deep linking stay reliable as the platforms evolve.\n\n### Which platforms does this plugin support?\n\nThe `getInstallReferrer(...)` method is only available on Android and the `getAttributionToken(...)` method is only available on iOS. On all other platforms, the respective method rejects as unimplemented.\n\n### Why is the install referrer no longer available on Android?\n\nGoogle only guarantees that the Play Store install referrer is available for a limited window after the app is installed. You should therefore fetch the referrer once shortly after the first launch and persist it in your app, so that it remains available later.\n\n### How do I resolve the attribution data from the Apple attribution token?\n\nThe token returned by `getAttributionToken(...)` is opaque and only the client half of the attribution flow. You must exchange it server-side against Apple's Ad Services attribution API, as described in [Attribution Token Exchange](#attribution-token-exchange-ios). Note that the token expires after 24 hours, so it should be exchanged promptly.\n\n### Do I need any permissions or special configuration?\n\nNo, the plugin does not require any runtime permissions or configuration. On Android, it uses the `com.android.installreferrer:installreferrer` library, whose version can be changed via the `$installReferrerVersion` project variable if needed (see [Installation](#installation)).\n\n### Can I use this plugin with Ionic, React, Vue or Angular?\n\nYes, the plugin is framework-agnostic. It works in any Capacitor app regardless of the web framework, including Ionic with Angular, React, or Vue, as well as plain JavaScript projects.\n\n## Related Plugins\n\n- [App Tracking Transparency](https://capawesome.io/docs/sdks/capacitor/app-tracking-transparency/): Request the user's permission to track them via the App Tracking Transparency framework on iOS.\n- [Firebase Analytics](https://capawesome.io/docs/sdks/capacitor/firebase/analytics/): Measure user engagement with Firebase Analytics.\n- [PostHog](https://capawesome.io/docs/sdks/capacitor/posthog/): Capture analytics events with the PostHog platform.\n\n## Newsletter\n\nStay up to date with the latest news and updates about the Capawesome, Capacitor, and Ionic ecosystem by subscribing to our [Capawesome Newsletter](https://cloud.capawesome.io/newsletter/).\n\n## Changelog\n\nSee [CHANGELOG.md](https://github.com/capawesome-team/capacitor-plugins/blob/main/packages/install-referrer/CHANGELOG.md).\n\n## License\n\nSee [LICENSE](https://github.com/capawesome-team/capacitor-plugins/blob/main/packages/install-referrer/LICENSE).\n","readmeFilename":"README.md"}