When a user clicks an invite link and doesn't have the app installed, we redirect him to Play Store from where the app can be installed. This redirection specifies a referrer parameter which can be used to check from where the app was installed. The, when the app is run, we check if referrer was set and if that's the case, we use it just like an invite link.
Depends on D7751