Le but de cet article est de décrire comment mettre en place des liens vers une application mobile. Tout d’abord, un petit point sur ce qu’on appelle un url scheme. Il s’agit d’un lien unique avec l’application. Celui se présente sous la forme monapplication://… . Lors du clic sur celui-ci depuis un smartphone, cela ouvrira l’application correspondante.

Small hitch: only if it is installed!

Ça se complique ! En effet, lors de l’envoi de l’email, il n’est pas possible de savoir si la personne ouvrira cet email sur son smartphone, ni sur quel système d’exploitation et encore moins si l’application souhaitée est installée Le premier point (ouverture sur mobile) peut être facilement contré avec les techniques habituelles (media queries). Pour les 2 derniers points, nous pouvons utiliser 2 approches: l’approche automatique (via javascript) ou bien l’approche déclarative (en demandant à l’utilisateur). Dans les 2 cas, il conviendra d’héberger une page intermédiaire sur son site afin de mettre en place une redirection.

The automatic approach

Il existe des tas de scripts permettant de détecter l’installation d’une application. À ce jour, la solution clé en main ultime n’existe pas et il faudra avoir des bases en javascript afin de pouvoir combiner les techniques existantes pour les adapter à vos besoins spécifiques (OS couverts par votre application,…) Voici quelques pistes de solution et snippets:

The declarative approach, my favorite

The idea here is simply to ask the user on an intermediate page what they want to do. The ideal options are the following:
  • Open the link in the mobile app (iOS or Android): you can also use system detection to offer only the most sensible choice.
  • Download the application: this is an opportunity to trigger an additional installation of your application
  • No thanks, I want to navigate to the website
A good practice is to set up a 'Keep my choice' checkbox. This way, the page will only serve as an instant redirection to direct the user in the most convenient way.

To go further...

Url schemes allow many possibilities. Of course, this requires some knowledge of mobile development. Here are some tips:
  • Redirect a user to a specific section of the application
  • Pre-fill a promo code in your application
But also lots of uses that are just waiting for your inspiration.

Conclusion

In summary, here are the positive and negative points of each approach. Declarative approach:
  • We add one more page in the user's journey
  • + It is reliable and transparent, the user knows exactly what is going to happen
  • + Opportunity to push an installation of the application
Automatic approach:
  • + It's automatic and fast for the user 😉
  • It is technically more complex to set up and the reliability of your development will be questioned at each hardware and software evolution

Reading content isn't everything. The best way is to talk to us.


Support the "Email Expiration Date"

Brevo and Cofidis financially support the project. Join the movement and together, let's make the email industry take responsibility for the climate emergency.

Stay informed with Badsender newsletters

Every month, we publish a newsletter on email marketing and an infoletter on sobriety and marketing. Read more.

Your email address will never be communicated to a third party. You can unsubscribe at any time with a single click.

The author

Quentin Vanmeerbeck Avatar

Leave a Reply

Your email address will not be published. Required fields are marked *