{"_id":"@dhrimz/capacitor-referrer","name":"@dhrimz/capacitor-referrer","dist-tags":{"latest":"8.0.0"},"versions":{"8.0.0":{"name":"@dhrimz/capacitor-referrer","version":"8.0.0","description":"Get Google Play Install Referrer details in Capacitor apps","main":"dist/plugin.cjs.js","module":"dist/esm/index.js","types":"dist/esm/index.d.ts","unpkg":"dist/plugin.js","author":{"name":"Leo Chaddad, Ryan Nacpil"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/dhrimz/capacitor-referrer.git"},"bugs":{"url":"https://github.com/dhrimz/capacitor-referrer/issues"},"keywords":["capacitor","plugin","native","install-referrer","google-play","referrer","android","capacitor-plugin","attribution","tracking"],"scripts":{"verify":"npm run verify:ios && npm run verify:android && npm run verify:web","verify:ios":"xcodebuild -scheme DhrimzCapacitorReferrer -destination generic/platform=iOS","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}\" --plugin=prettier-plugin-java","swiftlint":"node-swiftlint","docgen":"docgen --api CapacitorReferrerPlugin --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","prepublishOnly":"npm run build"},"devDependencies":{"@capacitor/android":"^8.0.0","@capacitor/core":"^8.0.0","@capacitor/docgen":"^0.3.1","@capacitor/ios":"^8.0.0","@ionic/eslint-config":"^0.4.0","@ionic/prettier-config":"^4.0.0","@ionic/swiftlint-config":"^2.0.0","eslint":"^8.57.1","prettier":"^3.6.2","prettier-plugin-java":"^2.7.7","rimraf":"^6.1.0","rollup":"^4.53.2","swiftlint":"^2.0.0","typescript":"^5.9.3"},"peerDependencies":{"@capacitor/core":">=8.0.0"},"prettier":"@ionic/prettier-config","swiftlint":"@ionic/swiftlint-config","eslintConfig":{"extends":"@ionic/eslint-config/recommended"},"capacitor":{"ios":{"src":"ios"},"android":{"src":"android"}},"_id":"@dhrimz/capacitor-referrer@8.0.0","gitHead":"3ba1c80fe0011f029beaa9a15f9c439b0b8c2072","homepage":"https://github.com/dhrimz/capacitor-referrer#readme","_nodeVersion":"20.18.1","_npmVersion":"10.8.2","dist":{"integrity":"sha512-E1nNe0VP1YVIJdiIMyvqVFcHUalkk7mAsVSrFWI3xGrWlWnPsGHfT1vYikV9N5aM2smO3Nd/wXkqlDNtoikLpg==","shasum":"ea8e18d62ac670fea566bc9e763b0746e99c53b4","tarball":"https://registry.npmjs.org/@dhrimz/capacitor-referrer/-/capacitor-referrer-8.0.0.tgz","fileCount":27,"unpackedSize":27953,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQC9huaW8jHEnmCdliZoPqkMi9zbiOLHb23OrWOuSx/TSwIgPQetsgqpRce/o1md6FQLzuA+uGAn1sBvEOjF2WVi/8g="}]},"_npmUser":{"name":"iamryann","email":"nacpil.ryan.d@gmail.com"},"directories":{},"maintainers":[{"name":"iamryann","email":"nacpil.ryan.d@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/capacitor-referrer_8.0.0_1774335298600_0.7677681046794884"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-24T06:54:58.534Z","8.0.0":"2026-03-24T06:54:58.770Z","modified":"2026-03-24T06:54:58.954Z"},"maintainers":[{"name":"iamryann","email":"nacpil.ryan.d@gmail.com"}],"description":"Get Google Play Install Referrer details in Capacitor apps","homepage":"https://github.com/dhrimz/capacitor-referrer#readme","keywords":["capacitor","plugin","native","install-referrer","google-play","referrer","android","capacitor-plugin","attribution","tracking"],"repository":{"type":"git","url":"git+https://github.com/dhrimz/capacitor-referrer.git"},"author":{"name":"Leo Chaddad, Ryan Nacpil"},"bugs":{"url":"https://github.com/dhrimz/capacitor-referrer/issues"},"license":"MIT","readme":"# @dhrimz/capacitor-referrer\n\nGet Google Play Install Referrer details in Capacitor apps using the latest [Google Play Install Referrer API](https://developer.android.com/google/play/installreferrer).\n\nThis plugin allows you to retrieve attribution information about how users installed your app from Google Play Store, including referrer URLs, timestamps, and instant app launch status.\n\n## Features\n\n- ✅ Uses the latest Install Referrer Library 2.2\n- ✅ Compatible with Capacitor 8\n- ✅ Full TypeScript support\n- ✅ Comprehensive referrer details including server-side timestamps\n- ✅ Install version tracking\n- ✅ Google Play Instant detection\n\n## Platform Support\n\n- ✅ **Android**: Full support\n- ❌ **iOS**: Not supported (Install Referrer is Android/Google Play only)\n- ❌ **Web**: Not supported\n\n## Install\n\n```bash\nnpm install @dhrimz/capacitor-referrer\nnpx cap sync\n```\n\n## Usage\n\n```typescript\nimport { CapacitorReferrer } from '@dhrimz/capacitor-referrer';\n\nasync function getInstallReferrer() {\n  try {\n    const referrerDetails = await CapacitorReferrer.getReferrerDetails();\n    console.log('Referrer URL:', referrerDetails.referrerUrl);\n    console.log('Click timestamp:', referrerDetails.referrerClickTimestampSeconds);\n    console.log('Install timestamp:', referrerDetails.appInstallTimestampSeconds);\n    console.log('Install version:', referrerDetails.installVersion);\n    console.log('Is instant app:', referrerDetails.googlePlayInstantParam);\n  } catch (error) {\n    console.error('Error getting referrer:', error);\n  }\n}\n```\n\n## Use Cases\n\n- **Attribution Tracking**: Identify which marketing campaigns drive app installs\n- **Analytics**: Track user acquisition sources\n- **A/B Testing**: Measure effectiveness of different promotional strategies\n- **Fraud Detection**: Verify legitimate install sources\n\n## API\n\n<docgen-index>\n\n* [`getReferrerDetails()`](#getreferrerdetails)\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### getReferrerDetails()\n\n```typescript\ngetReferrerDetails() => Promise<ReferrerDetails>\n```\n\nRetrieves the install referrer details from Google Play.\nNote: This method only works on Android. On iOS/Web, it will reject with an error.\n\n**Returns:** <code>Promise&lt;<a href=\"#referrerdetails\">ReferrerDetails</a>&gt;</code>\n\n--------------------\n\n\n### Interfaces\n\n\n#### ReferrerDetails\n\n| Prop                                      | Type                 | Description                                                                             |\n| ----------------------------------------- | -------------------- | --------------------------------------------------------------------------------------- |\n| **`referrerUrl`**                         | <code>string</code>  | The referrer URL of the installed package.                                              |\n| **`referrerClickTimestampSeconds`**       | <code>number</code>  | The timestamp in seconds when referrer click happened.                                  |\n| **`appInstallTimestampSeconds`**          | <code>number</code>  | The timestamp in seconds when installation began.                                       |\n| **`referrerClickTimestampServerSeconds`** | <code>number</code>  | The timestamp in seconds when the user first opened the app after installation.         |\n| **`appInstallTimestampServerSeconds`**    | <code>number</code>  | The timestamp in seconds when the app installation began from the server's perspective. |\n| **`installVersion`**                      | <code>string</code>  | The app's version at the time when the app was first installed.                         |\n| **`googlePlayInstantParam`**              | <code>boolean</code> | Whether the instant experience was launched.                                            |\n\n</docgen-api>\n","readmeFilename":"README.md","_rev":"1-f94d3054bfa5ca4e4dd984005c50c047"}