Firebase Dynamic Links are deep links that drive user growth and engagement by allowing you to send users to specific places in your app - across iOS, Android, and the web. Dynamic Links retain their context and attribution data, even if a user needs to install your app first, ensuring new users see the content they're looking for right away. While Dynamic Links can be useful in a number of situations, we heard from many of you that you wanted more ways to customize the actual URL that made up a Dynamic Link.
In the past, Dynamic Links contained a randomly generated subdomain that could not be customized. So when you created a new link, it would look something like https://a7cd8.app.goo.gl/B7vVu.
https://a7cd8.app.goo.gl/B7vVu
Today, we're excited to introduce three ways you can customize your dynamic links: a brand agnostic domain, custom subdomains, and custom paths. Moving forward, you can update your links from something that looks like https://a7cd8.app.goo.gl/B7vVu to a much more friendly https://mygame.page.link/mycampaign.
https://mygame.page.link/mycampaign
We're rolling out these changes after talking with many of you and running tests on how we could improve Dynamic Links. Through your feedback and our experimentation, we discovered three important things:
https://a7cd8.page.link/B7vVu
https://mygame.app.goo.gl/B7vVu
https://a7cd8.app.goo.gl/B7vVu.
https://a7cd8.app.goo.gl/mycampaign
With these results in mind, we are giving you the flexibility to use a brand agnostic root (page.link), create up to five custom subdomains per project, and create a custom path for each new short link. Now, you can have links that look like: mygame.page.link/joinme, mygame.page.link/holidays and mygame-lite.page.link/holidays.
page.link
mygame.page.link/joinme
mygame.page.link/holidays
mygame-lite.page.link/holidays
When you customize your dynamic links in these three ways, your brand will shine through, you will increase trust and conversion, and you'll be able to design links to better fit the context of where they are used.
Creating custom Dynamic Links is easy. There is a one-time setup process in the Firebase Console to set up your domain. Once that's done, you can create new links programmatically or via the console on your chosen domain.
If you're new to Dynamic Links, you'll be prompted to enter a custom subdomain during the setup process. For trademarked subdomains, we also have a verification flow to ensure that the subdomain is reserved for the developer that owns the brand.
For developers with existing Dynamic Links, you may continue to use links on app.goo.gl or create new links on page.link.
app.goo.gl
You'll be able to view the links and associated analytics per domain by selecting the domain from a drop-down selector.
For more information on creating Dynamic Links programmatically, see our documentation on iOS, Android and the REST API.
Thank you to everybody who has been using Dynamic Links and providing us with valuable feedback. We hope that these changes will result in more user engagement and more clicks on your dynamic links for your app.
If you have any questions, feedback or bugs to report please reach us at firebase.google.com/support.
Learn more about Firebase Dynamic Links at https://firebase.google.com/products/dynamic-links/.
On May 25, a new piece of European data protection legislation came into force: the General Data Protection Regulation, or GDPR.
We know that GDPR compliance is at the top of many of your minds, so we've been working hard over the past few months to ensure that you have the resources you need.
We updated to new, GDPR-friendly terms that includes the Firebase Data Processing and Security Terms. We've also given you a way to specify a Data Processing Officer (DPO) or EU Representative in the Firebase console. If you've already added your project's DPO or EU Rep in the Google Cloud console, you don't need to do it again for Firebase.
It's not just about the GDPR either - we've certified many Firebase products under security standards such as ISO 27001, ISO 27017, ISO 27018 and SOC 1, 2 and 3.
To help you implement privacy best practices we've added a dedicated Privacy and Security in Firebase section, launched a new guide on how to manage Instance IDs, and given you some suggestions on how to clear and export user data and store privacy settings using Firebase tools.
For Google Analytics for Firebase users, we have a new guide on your data management options, new sharing settings within the Firebase console that lets you have more control over your data, and a new API for deleting data associated with an Analytics App Instance ID.
Finally, you may want to check out our Google I/O session on paving the way to using Firebase within your enterprise for more ideas on how to manage user data:
If you have any further questions, don't hesitate to reach out to our support team—we can't offer legal advice, but we'll do what we can to help you out with any specific questions or technical concerns.
We have great news for web developers that use Firebase Cloud Messaging to send notifications to clients! The FCM v1 REST API has integrated fully with the Web Notifications API. This integration allows you to set icons, images, actions and more for your Web notifications from your server! Better yet, as the Web Notifications API continues to grow and change, these options will be immediately available to you. You won't have to wait for an update to FCM to support them!
Below is a sample payload you can send to your web clients on Push API supported browsers. This notification would be useful for a web app that supports image posting. It can encourage users to engage with the app.
{ "message": { "webpush": { "notification": { "title": "Fish Photos 🐟", "body": "Thanks for signing up for Fish Photos! You now will receive fun daily photos of fish!", "icon": "firebase-logo.png", "image": "guppies.jpg", "data": { "notificationType": "fishPhoto", "photoId": "123456" }, "click_action": "https://example.com/fish_photos", "actions": [ { "title": "Like", "action": "like", "icon": "icons/heart.png" }, { "title": "Unsubscribe", "action": "unsubscribe", "icon": "icons/cross.png" } ] } }, "token": "<APP_INSTANCE_REGISTRATION_TOKEN>" } }
Notice that you are able to set new parameters, such as actions, which gives the user different ways to interact with the notification. In the example below, users have the option to choose from actions to like the photo or to unsubscribe.
To handle action clicks in your app, you need to add an event listener in the default firebase-messaging-sw.js file (or your custom service worker). If an action button was clicked, event.action will contain the string that identifies the clicked action. Here's how to handle the "like" and "unsubscribe" events on the client:
like
unsubscribe
// Retrieve an instance of Firebase Messaging so that it can handle background messages. const messaging = firebase.messaging(); // Add an event listener to handle notification clicks self.addEventListener('notificationclick', function(event) { if (event.action === 'like') { // Like button was clicked const photoId = event.notification.data.photoId; like(photoId); } else if (event.action === 'unsubscribe') { // Unsubscribe button was clicked const notificationType = event.notification.data.notificationType; unsubscribe(notificationType); } event.notification.close(); });
The SDK will still handle regular notification clicks and redirect the user to your click_action link if provided. To see more on how to handle click actions on the client, check out the guide.
Since different browsers support different parameters in different platforms, it's important to check out the browser compatibility documentation to ensure your notifications work as intended. Want to learn more about what the Send API can do? Check out the FCM Send API documentation and the Web Notifications API documentation. If you're using the FCM Send API and you incorporate the Web Notifications API in a cool way, then let us know! Find Firebase on Twitter at @Firebase, and Facebook and Google+ by searching "Firebase".
Heading to WWDC this year? Join us at the Firebase party on June 4th as we celebrate with the top iOS developers from around the world.
We're excited to once again throw a party for our community at this year's conference. If you're going to be in town, join us for a night to mingle with other developers, meet engineers and product leads from the Firebase team, and relax after the first day of WWDC.
We look forward to hearing about all the cool stuff you've been working on.
Tickets are limited so request your invite today! (Note: a confirmed ticket is required for entry)
In today's fast-moving world, people have come to expect mobile apps to be intelligent - adapting to users' activity or delighting them with surprising smarts. As a result, we think machine learning will become an essential tool in mobile development. That's why on Tuesday at Google I/O, we introduced ML Kit in beta: a new SDK that brings Google's machine learning expertise to mobile developers in a powerful, yet easy-to-use package on Firebase. We couldn't be more excited!
Getting started with machine learning can be difficult for many developers. Typically, new ML developers spend countless hours learning the intricacies of implementing low-level models, using frameworks, and more. Even for the seasoned expert, adapting and optimizing models to run on mobile devices can be a huge undertaking. Beyond the machine learning complexities, sourcing training data can be an expensive and time consuming process, especially when considering a global audience.
With ML Kit, you can use machine learning to build compelling features, on Android and iOS, regardless of your machine learning expertise. More details below!
If you are a beginner or want to implement a solution quickly, ML Kit gives you five ready-to-use ("base") APIs that address common mobile use cases:
With these base APIs, you simply pass in data to ML Kit and get back an intuitive response. For example: Lose It!, one of our early users, used ML Kit to build several features in the latest version of their calorie tracker app. Using our text recognition based API and a custom built model, their app can quickly capture nutrition information from product labels to input a food's content from an image.
ML Kit gives you both on-device and Cloud APIs, all in a common and simple interface, allowing you to choose the ones that fit your requirements best. The on-device APIs process data quickly and will work even when there's no network connection, while the cloud-based APIs leverage the power of Google Cloud Platform's machine learning technology to give a higher level of accuracy.
See these ready-to-use APIs in the Firebase console:
Heads up: We're planning to release two more APIs in the coming months. First is a smart reply API allowing you to support contextual messaging replies in your app, and the second is a high density face contour addition to the face detection API. Sign up here to give them a try!
If you're seasoned in machine learning and you don't find a base API that covers your use case, ML Kit lets you deploy your own TensorFlow Lite models. You simply upload them via the Firebase console, and we'll take care of hosting and serving them to your app's users. This way you can keep your models out of your APK/bundles which reduces your app install size. Also, because ML Kit serves your model dynamically, you can always update your model without having to re-publish your apps.
But there is more. As apps have grown to do more, their size has increased, harming app store install rates, and with the potential to cost users more in data overages. Machine learning can further exacerbate this trend since models can reach 10's of megabytes in size. So we decided to invest in model compression. Specifically, we are experimenting with a feature that allows you to upload a full TensorFlow model, along with training data, and receive in return a compressed TensorFlow Lite model. The technology behind this is evolving rapidly and so we are looking for a few developers to try it and give us feedback. If you are interested, please sign up here.
Since ML Kit is available through Firebase, it's easy for you to take advantage of the broader Firebase platform. For example, Remote Config and A/B testing lets you experiment with multiple custom models. You can dynamically switch values in your app, making it a great fit to swap the custom models you want your users to use on the fly. You can even create population segments and experiment with several models in parallel.
Other examples include:
We can't wait to see what you'll build with ML Kit. We hope you'll love the product like many of our early customers:
Get started with the ML Kit beta by visiting your Firebase console today. If you have any thoughts or feedback, feel free to let us know - we're always listening!