Search code examples
wordpressdeep-linking

How to fix deep link issues on some website


I've got a mobile application that successfully can open deep links. Simply clicking on a URL or button will open the app on most of the websites. Except for one (that I currently know off).

I'm trying to rule out possible causes, but I can't find any documentation on possible caveats. Any light on the possible causes below, if some other things should be checked I would love to hear them as well.

The structure of the deep link is as follows: "https://www.domain.example/de-app/:id

  1. The website where the deep link is not working correctly is the base of the deep link
  2. The link is forwarded to from a Wordpress plugin (filters to ensure the dynamic part within the url is setup correctly)
  3. The original href is prevented to also keep track on how many times the deep link has been used.
anchor.onclick = (e) => {
   e.preventDefault();
   
   try {
     // some async logic
     
     self.location.href = e.target.href
   } catch (error) {
      self.location.href = e.target.href
   }
}

Any other tips are welcome as well.


Solution

  • I was able to find some more information on this topic. As it turns out deep linking is not intended to work on the same domain as the domain for which the deep link is defined.

    And thinking about it, this makes a lot of sense. Although for how I intended to use the deep linking system this is not the case, it could result in a pretty poor user experience if it would switch on and off between the website and app when navigating through the website.