I have a very specific use case. We are working on a Project where user can buy the tickets to an event. In this, we are asking the user to enter an Email id where he can receive the email from where he can receive the ticket onto our App. This email has the link using which user will receive the ticket inside an App. When the user clicks on the link in this email he is redirected to a webpage which checks whether our App is installed on the device, and if it is, he is redirected to the App where he can receive the ticket into his account. If the app is not installed then he is redirected to App store and is asked to install the App. After installing the App the user logs in to our App, now he has to go back to the email, click on the link again in-order receive the ticket inside App. User can use different Email Ids to log in to the App and to receive the email containing the url to receive the ticket. This is a specification which our client wants. Now coming to the problem. We are planning to make this process smooth so that if user clicked on URL to receive the ticket into his account before the App was installed, when he installs the app this should happen automatically. There a multiple problems when trying to implement this:-
1.) There is no way for me to know if a user is to be redirected to a specific screen on the App once he logs in as email id where the email with ticket reception link was sent can be different from the one he logged in.
2.) I was planning to use a combination of IP, Screen Siz and Os Version to make a unique key at the backend side. When user clicks on receive ticket link and is directed to a webpage, I will send this data to Server and store it. When App opens I can again send the data to verify if this user tried to receive Ticket when App was not installed. But in this case, there will be a lot of issues. People using the same kind of device and accessing the internet using same Wifi router will have the same info.
I am not able to think of any solution on how I can uniquely identify the user. There is no way to interchage data between App and Browser cache, neither is it possible for me to access MAC address or Device IMEI from JavaScript. This is to be done for both Android and iOS app.
Any help would be highly appreciated.