If you want to make your product popular, the strategy of mouth publicity is unavoidable part of the marketing campaigns. In the world of technology, referrals are substituted by mouth publicity. The concept of Firebase Dynamic links has basket full of services that help you creating links for referring your product(apps in this case), tracking them and also analysing the growth(app downloads) with multiple categories and filters. You can explore more about Firebase features and functionalities here.
I shall be explaining you an adventurous recipe of making sandwiches(dynamicUrl) and also serving fries and juice(additional tracking parameters) with this healthy dish(dynamicUrl). What’s more crazy? I will be giving you an idea about making a new friend(calling imports) and cooking with it!
- Call for help!
Make sure to use the latest version of the plugin.
2. Make friends & accept the help :
Once you have included the dependency, update your project with new package that you have called.
3. Time to use your connection :
Congratulations! You have made an awesome connection. You’re now ready to use the library by creating an import in your dart code.
Now that your setup is ready, let’s understand the code you will be implementing to use this plugin successfully!
The link that you will be creating shall navigate to AppStore if opened on an iPhone, PlayStore for Android device for first time user. User will be navigated to website if link is clicked on a desktop.
You can create a Long Dynamic URL or a Short Dynamic URL, whichever suits your ideas and thoughts for app growth.
Dynamic Link will be taking a few parameters for creating the link. Parameters for Android and iOS are necessary for successfully navigating user towards the AppStore or PlayStore if he is a first time user.
Domain is the domain name for your product. Let’s assume here that our product domain is “example.com”. Then you have to mention the domain name as : https://example.page.link.
B. Link :
The link your app will open. Specify a URL that your app can handle, typically the app’s content or payload, which initiates app-specific logic (such as crediting the user with a coupon or displaying a welcome screen). This link must be a well-formatted URL, be properly URL-encoded, use either HTTP or HTTPS, and cannot be another Dynamic Link.
So your link will be : Uri.parse(‘http://example.com/'). The link is added inside the Uri.parse function simply does not parse the link but also creates an Uri object of the string passed. It helps to notify the content provider what exactly we want to access using the link reference.
C. Android Parameters :
Two not to escape parameters for Android are the package name and the minimum OS version restrictions.
packageName: 'com.example', //your project package name
D. iOS Parameters :
There are 3 parameters you can provide within the iOS parameters : bundleID, minimumVersion, AppStoreID.
Time to Cook :
Now that the basic ingredients are ready, add all these parameters inside the DynamicParameters function.
final DynamicLinkParameters parameters =
Turn the flame on :
Now that you have mixed the ingredients this vegetable layered sandwich is now ready. Time to grill the sandwich to bind the ingredients well.
final Uri dynamicUrl = await parameters.buildUrl();
This will help you to bind all the parameters in a single url.
Well dinner is ready to serve. You can share this Url to the audience using a share button in your app.
How about some fries and juice with this perfect healthy recipe?
You can also add
itunesConnectAnalyticsParameters, socialMetaTagParameters to get more insights about your app promotion.
Concluding to this blog, thank for patiently reading the blog till the end. Hope you find this blog useful. Remember, including the right and exact parameters will help you building the exact url.