1

Is there a way to detect where a chrome extension installation was referred from. In case you want to rebrand the extension based on where the user came from

Android Apps are capable of this using intent com.android.vending.INSTALL_REFERRER and a referrer=something querystring on their Google Play URL, but I've been unable to find anything similar for Chrome Extensions.

I can probably do a 80% solution with cookies and redirects but it would be nice if this worked as cleanly as in Android INSTALL_REFERRER

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491
David Dehghan
  • 22,159
  • 10
  • 107
  • 95

1 Answers1

1

It seems that there is no referrer option for Chrome Extensions and it is not listed in the documentation. See the following link for the closest I've found.

https://developer.chrome.com/extensions/runtime#type-OnInstalledReason

A workaround for this would be to pull the data from Google Analytics using the API. Referrals are recorded in Google Analytics for my Chrome Extension:

Google Analytics referrers for Chrome Extension

forgetso
  • 2,194
  • 14
  • 33
  • Yeah. I get that too but i need this data to be passed to chrome extension after install in real time. This is the only way you can give proper attribution to the source of the the install. Android market implemented this a few years ago. After your app is installed by the the market place it will get an intent which passes to you the query string that was passed along to Android market. I suspect that Chrome store is just no mature enough for this level of feature. On the Android side where there are billions being spent on marketing apps this is an essential feature. – David Dehghan Aug 24 '15 at 18:04
  • Ok. At this time there is definitely no way to pass this data in real time. Chrome does not allow content scripts in the Chrome Extensions web site so there is no way to pass the `document.referrer` from that tab. – forgetso Aug 24 '15 at 19:16
  • I was thinking that I could create a redirector and then set a referrer cookie on the domain and then read the cookie later. But enforcing that all new users go through that redirector wont be easy or consistent. :-( – David Dehghan Aug 24 '15 at 22:17