Cross platform game : a way to share in-game links


We are working on a cross platform game where users can create their own maps and share it with thier friends.

We would like to build links (like https:///<id_of_a_map> ) that new players could click on and be redirected to Google Play if they are using Android, or Apple Store on IOS or Steam (or an equivalent) if they are playing on PC to download the app. After download the new user should be redirected into the map prefered in the link.

What would be the way to go? What are the common pitfalls ?

Thank you in advance

Jérôme Dewandre