{"id":16957307,"url":"https://github.com/ueman/flutter_referrer_info","last_synced_at":"2026-01-29T22:30:25.875Z","repository":{"id":239352478,"uuid":"798655801","full_name":"ueman/flutter_referrer_info","owner":"ueman","description":"Plugin to read referrer information","archived":true,"fork":false,"pushed_at":"2024-05-11T18:38:05.000Z","size":54,"stargazers_count":4,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-11T12:19:32.999Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ueman.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-05-10T08:04:10.000Z","updated_at":"2024-10-05T18:27:06.000Z","dependencies_parsed_at":"2024-05-11T18:54:10.059Z","dependency_job_id":"466d94e6-9cf0-4ec3-b75d-85a633b2ef45","html_url":"https://github.com/ueman/flutter_referrer_info","commit_stats":null,"previous_names":["ueman/flutter_referrer_info"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ueman%2Fflutter_referrer_info","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ueman%2Fflutter_referrer_info/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ueman%2Fflutter_referrer_info/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ueman%2Fflutter_referrer_info/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ueman","download_url":"https://codeload.github.com/ueman/flutter_referrer_info/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239779705,"owners_count":19695726,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-13T22:18:47.553Z","updated_at":"2026-01-29T22:30:25.829Z","avatar_url":"https://github.com/ueman.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Referrer\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://pub.dev/packages/referrer\"\u003e\u003cimg src=\"https://img.shields.io/pub/v/referrer.svg\" alt=\"pub.dev\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://pub.dev/packages/referrer/score\"\u003e\u003cimg src=\"https://img.shields.io/pub/likes/referrer\" alt=\"likes\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://pub.dev/packages/referrer/score\"\u003e\u003cimg src=\"https://img.shields.io/pub/popularity/referrer\" alt=\"popularity\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://pub.dev/packages/referrer/score\"\u003e\u003cimg src=\"https://img.shields.io/pub/points/referrer\" alt=\"pub points\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\nThis is a plugin which allows you to read various referrer information.\n\nA referrer is the URL of the webpage (or app) that caused the app to be opened via a deep link.\n\nMost APIs are subject to various platform limitations and they're subject to the referrer policy of the webpage.\nTherefore, all information read via the APIs of this plugin may not be available due to various reasons.\n\n## iOS\n\nOn iOS this works by reading [`NSUserActivity#referrerUrl`](https://developer.apple.com/documentation/foundation/nsuseractivity/2875762-referrerurl).\n\n## Android\n\nOn Android this reads [`Intent.EXTRA_REFERRER`](https://developer.android.com/reference/android/content/Intent#EXTRA_REFERRER) of the last incoming intent.\n(Related [`Activity#getReferrer()`](https://developer.android.com/reference/android/app/Activity#getReferrer()))\n\nIt's up to the browser and the webpage's referrer policy to supply a value. On Android, the referrer can also contain the name of the application that \nstartet the app. This means this can not just include the URL, but also other applications.\n\nIn general, Chrome does a good job of supplying the referrer information. The referrer is mostly not available when opening a deeplink via Firefox.\n\n## Other platforms\n\nOn platforms other than Android and iOS calling any method of this plugin results in a no-op.\n\n# How to use this?\n\nHere's some examples demonstrating where it may make sense to read the referrer information.\n\n## With Flutter's deeplink mechanism\n\n```dart\nclass ReferrerObserver with WidgetsBindingObserver {\n\n  @override  \n  Future\u003cbool\u003e didPushRouteInformation(RouteInformation routeInformation) async {\n    final referrerInfo = await Referrer().getReferrer();\n    // do something with referrerInfo\n    return false;\n  }\n}\n\n// Add the observer somewhere\nWidgetsBinding.addObserver(ReferrerObserver())\n```\n\n## With [`app_links`](https://pub.dev/packages/app_links)\n\n```dart\nfinal _appLinks = AppLinks();\n\n_appLinks.uriLinkStream.listen((uri) async {\n    final referrerInfo = await Referrer().getReferrer();\n    // do something with referrerInfo\n});\n```\n\n# Install referrer\n\nThis library does not offer tracking of the install referrer.\nHowever, there are various other packages that can read the install referrer.\n\n- iOS doesn't have an API to read or track install referrers.\n- On Android devices with Google Play Services, you can use [`android_play_install_referrer`](https://pub.dev/packages/android_play_install_referrer).\n- On Android devices with Huwei Mobile Services (HMS) you can use the [huawei_ads](https://pub.dev/packages/huawei_ads) package to obtain install referrers via the [`InstallReferrerClient`](https://pub.dev/documentation/huawei_ads/latest/huawei_ads/InstallReferrerClient-class.html) (see also its [docs](https://developer.huawei.com/consumer/en/doc/HMS-Plugin-Guides/install-referrer-0000001050439039-V1)).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fueman%2Fflutter_referrer_info","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fueman%2Fflutter_referrer_info","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fueman%2Fflutter_referrer_info/lists"}