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.
One issue with this implementation is that after a user cancels the invite, close the app, and opens it again, we show the invitation. We probably don't want this behavior, but I haven't found the solution yet.
Depends on D7743