Randy Arba
3 min readNov 9, 2021

--

https://unsplash.com/photos/UhvEJosq-Zo

Use Firebase to Optimize Share Campaign

Campaign is another way to increase our sales value in company, its one of many way to get more business development, why need campaign? Our sales need to broadcast that we had product or feature, so people can try and fell the experience, after that convert it into money, so that is the business man perspective.

So right now, as developer perspective how we can improve share in our product, especially in mobile product. we had two platform IOS and Android, we didn't had hybrid project but we had native development so we will try to use and integrate all technologies dependencies each platform, mean Kotlin in android and Swift in IOS.

Okay, at first time the campaign will trigger each user share link, this link will lead user into our app. We need improve and bring successful experience during onboarding when they click link until use feature.

Link is major and first impression for user before they willing to click, so this link must be interesting and must be pull user to click. Many social media platform have generate data after user copy paste into social media (although need few second to see it). After few second this link will generate thumbnail title and description. This is good approach to make our looks fancy.

No only Fancy but it will bring trust user for think this link is not spamming or lead them into malicious website. Yes, as user perspective, if i got link that suspicious like the pattern link is no readable it might me to remove and not trust this link anymore. So Generate Social media link solve this problem, although they think this link is not readable but after see through thumbnail, title and description, they will think this link is okay to click and share.

Not every link can generate thumbnail as well, this only happen if the that web have metadata open graph to generate thumbnail at social media platform. So make sure the link have contain metadata open graph. But what if we cant control the metadata open graph what will do then as mobile developer. The answer is use dynamic link or app indexing.

Firebase Dynamic link not only bring or convert web user into mobile app user, but it has more feature inside dynamic link. They provide us to create custom link that can generate thumbnail without metadata open graph from web. even we can custom all we need for every link that we share, like thumbnail, title, description, analytics and many more. You can check the detail here. Below is example how create dynamic link in Android Platform with Kotlin language.

val dynamicLink = Firebase.dynamicLinks.dynamicLink {
link = Uri.parse("https://www.example.com/")
domainUriPrefix = "https://example.page.link"
androidParameters("com.example.android") {
minimumVersion = 125
}
iosParameters("com.example.ios") {
appStoreId = "123456789"
minimumVersion = "1.0.1"
}
googleAnalyticsParameters {
source = "orkut"
medium = "social"
campaign = "example-promo"
}
itunesConnectAnalyticsParameters {
providerToken = "123456"
campaignToken = "example-promo"
}
socialMetaTagParameters {
title = "Example of a Dynamic Link"
description = "This link works whether the app is installed or not!"
}
}

The Main Concern is Domain prefix that you must provided based your dynamic link in firebase dashboard, then Uri parse is main link that will redirect into it. For Generate Thumbnail you must use SocialMetaTagParameters, it contain title, description, and imageUrl. Just custom and add it in your own. The other part is optional but if you need add UTM source you can provide it in googleAnalyticsParameters.

Thats all, you already create dynamic link, this dynamic link will redirect into main link that you already provided in builder. Dynamic link also support new user lead them to download the apps instead go to into web, example if new user tap dynamic link they will lead into Playstore to download the app and continue the process, instead go to into web and process in web. It’s kind of encourage user to use the app, although user have choice to decide open with app or their browser.

--

--