Configuring the Mapping
Firebase Dynamic Links only support http/s links. Since Purple Apps use the purple:// scheme, you need to configure a mapping from your Dynamic Links domain to the Purple Action URLs / Deep Links. This is done by using a file called deeplink_mappings.json which is located under Purple Manager's Dynamic Resources.
Within this file, you will need to use regular expressions.
Create a new json file called deeplink_mappings.json with an editor like Visual Studio Code or Brackets. This JSON file will contain a list of regular expressions and substitutions.
One example is the URL you want to use for your dynamic deep link within your app. For example, something like http://www.mybeautifulurl.com/article/
Using regular expressions, the URL will be converted into:
http:\\/\\/www.mybeautifulurl.com\\/article\\/(.+)
Another example:
- You have created the following short URL for your dynamic link: Short-URL: https://mybrandlink.page.link/test
- The deeplink URL points towards an article you want to share: deeplink URL: https://mybrand.com/article/09876412345
The mapping should then look like this:
This setup leads to the following scenario:
The following link is shared via Mail or other communications channels:
https://mybrand.page.link/test
The customer clicks on that link and the following happens:
Desktop PC The customer opens the URL https://mybrand.com/article/09876412345 in the Browser.
Android/iOS The customer opens the app (if installed, else the Store is opened to offer the download of the app) and the mapping would do the following:
and open the respective article within the app.
After configuring the deeplinks_mapping.json it needs to be stored within the default folder of your dynamic content. To do so, follow this steps:
- Go to Purple Manager, Apps, and click on the three dot menu
- Click on 'Dynamic', and download the Dynamic Content
- Insert the 'deeplink_mappings.json' file to the folder
- Upload the Dynamic content folder to Purple Manager again.
- Now You can perform the testing of your created Dynamic Links.