[Music]
getting users to download and start to
use your app can be an all-encompassing
driving goal
but what about keeping your users
engaged and building on top of that
initial honeymoon period
how do you make sure your app feels
really personalized without constantly
shipping new releases with increasingly
complicated workflows
one way is by using contextual messages
they help guide users to the right
content at the right moment
we'll be sharing examples of how you can
use relevant and contextual messaging to
grow your app
building meaningful engagement and
connection with your users
i'm mega bangalore and i'm todd hansen
thanks for joining us we're both
engineering leads at firebase
though we'll see more from todd in a bit
when trying to engage your users you
want to be able to really connect with
them not only when they're actively
using your app
like providing hints in a game when
they're stuck on a level
but also when they're not using your app
if there's some critical news that just
can't wait
we'll explore two distinct approaches to
setting up personalized
messaging both in-app and out
i'll start by teaching you how to set up
campaigns and nudges
to guide your users to the features and
sections of the app that are the highest
value to you
todd will show you how to send messages
to topic subscribers via the
programmatic apis
he'll then dig into some advanced api
use cases using analytics labels
bigquery and a new fcm feature direct
boot
but first to set the stage todd and i
are working to grow our latest app
a cooking app where users can discover
and share recipes with friends
a lot of the recipes shared within the
app come from cookbooks
and i wanted to launch a new integration
to allow users to easily buy the
cookbooks that feature their favorite
recipes
to promote this integration i created a
sale where cookbooks were 10
off for a limited time while we could
send all of our users the sale
notification
todd and i are seasoned app developers
and only want to send the right users
this message
getting interrupted by an irrelevant
message can be jarring
and we want to do our best to avoid that
we used a feature called dynamic
audiences in google analytics for
firebase
for those new to ga for firebase it's a
great way to track
key client-side metrics you get a lot of
great metrics out of the box
but can also define custom ones dynamic
audiences are one of analytics's super
powered features
you can cluster your users into segments
or audiences
based on their in-app actions and
behaviors
for more info on how to set up your
audiences and analytics in general
see the links in the description i
already have my dynamic audiences
configured
so now to set up my messaging campaigns
there are two types in firebase
in-app and cloud messaging let's use
both to ensure we're reaching our users
in the most effective way
but you rightly ask mega why are there
two types of messaging and how should i
be using them
great question my remote friends let's
do a bit of comparison
first to introduce the messaging types
let's start with firebase cloud
messaging or
fcm for short fcm is a cross-platform
messaging solution
that lets you reliably send
notifications to your users when they
aren't using your app
with sdks for ios web android and unity
let's say that i am tootling along
browsing stack overflow when i get
summoned back into my photos app by this
critical notification what there are
chinchillas on the internet and no one
is watching
my photos app knows that i can't resist
acute chinchilla and that i love to see
new photos instantly as they get added
even when i'm not currently browsing
through the app fcm is perfect for
re-engaging users who aren't using your
app you're able to send a message to a
user's notification bar
and with the right compelling chinchilla
related message
bring them back firebase in-app
messaging or
phiam on the other hand provides a fully
managed ui to display messages within
your app
think a nice card or modal encouraging
users to rate your app or connect their
address book
for example i'm happily using the app
and when i go to my profile page
this triggers if i am encouraging me to
add my hometown to my settings
vyam is great for deepening user
engagement with users while they're
already using the app
so let's compare how these two are
similar and how they differ
who is eligible for the message with
both fcm
and fian you can use user segments or
audiences
additionally fcm allows sending to topic
subscribers
todd will dig more into topics soon when
do they see it
with fcm you control when the user gets
the notification
with fiam your user's actions control if
and when the user sees the message
if the trigger event is level up but
your user never does
they will never see that message what do
they see
fcm shows as a notification in their
system bar
and phiam shows as an embedded part of
your app
and finally how does it get to their
device fcm sends it on demand
when the user should see it the message
is sent for fiam
our sdk periodically fetches the
eligible messages
now that we're clear on the differences
between fcm and fiam
let's go to the firebase console and see
how you can configure your messaging
campaigns
both messaging tabs can be found
undergrow let's start with bayem
now if you wanted to run an experiment
on the messaging campaigns
you could click here to configure the
experiment details specifying what
variants to show
etc to learn more about running
experiments
which you can do with both in-app and
cloud messaging check the description
i already know exactly what i want to
send however so let's just run a
campaign directly
not only that with the power of some
movie magic i already have one prepared
let's take a look first we start with
what message
users will see there are four template
types to choose from
i recommend the card type to start with
there are a few more guard rails to help
make your message look great
you can configure the text and
background colors set the message title
and text as well as preview the message
over here
on the right here i linked the image
that i want displayed
you can use firebase storage or hosting
or really any url to host the image and
note if you want to have different
images for landscape or portrait
orientations
i would strongly recommend you make sure
that whatever is hosting the image
is ready for scale and fronted with a
cdn though
we want to ensure that all your users
will be able to see it
here's the primary button click link
this takes users directly to the sale
page
with details on how the cookbook promo
code works
you can put a firebase dynamic link here
or use any other deep linking tool
you've configured in your app
next we define who will see the message
in target
i want users who had not bought anything
in the last seven days
and who were seen in the app in the last
week
here i use the not in with my weekly
active purchasers audience
and add an additional condition for app
activity
you can construct any combination of
audiences user properties etc
to configure the group eligible to
receive this message you don't need a
special audience per campaign
you can also define localization options
either automatically powered by the
google translate api
or manually curated by your own
localization team
my italian in-laws are big fans of my
app so i can use google translate to
provide a translated message that will
be sent to all devices
set to italian the default text will
show up for any language that doesn't
have a specific translation defined
next we define when a user is eligible
for this message
and when they can see it i want this to
be a limited run
so i can set the end date for this
campaign here but
more importantly i set the triggering
event this is the local event that is
used to trigger the message display
i want these messages displayed when the
user fires the recipe favorite event
and to only show once per device to
avoid feeling spammy
if it were a critical terms of service
update though i might want to configure
this message
to show once per day on app foreground
for the week leading up to the change
now the reason for this campaign was to
increase in-app purchases
so i specified the relevant conversion
event here so we can track this
as part of our campaign stats in
additional options
there are fields for custom data that
can be sent with each in-app message
this is metadata that you can
programmatically act on on device
i want to immediately change the app
when a user clicks on the message
and by defining in-app messaging
callbacks and specifying this custom
data
i can see the details for more on
handling callbacks in your app
the campaign is now ready to go live but
first there's a review summarizing the
key details to do final verification
before
it's published now to configure the fcm
campaign
this is actually really similar to the
in-app configuration
so i'm just going to highlight the
important differences
like before we start with what your
users will see
next we go to who will get this message
which has the option to pick a user
segment
as we had in phiam but also by topic
unique to fcm
since we want to use analytics audiences
we'll stick to user segment
we specified that the last user app
engagement should have been over a week
ago
this way we're ensuring that weekly
active users are getting the in-app
message
but our less active users are getting a
notification
it's not necessary to create these
disjoint conditions between in-app and
cloud
but this way we can ensure that we bias
towards the contextually triggered
in-app message where possible
users are already in your app with the
right mindset to explore more
when we choose the when users will
receive this message we can also
configure it to either use
your time zone or the device's local
time
if i want a nice morning digest to show
up at the right time for both people
living in
california and italy recipient time is
what i select
speeding through here we see our
friendly review screen and publish to
make it live
clicking on any of the campaigns in
either the fcm or phiam dashboards will
show the activity of the campaign
in this case since we've just scheduled
these campaigns these are still empty
[Music]
now we've got both our messaging
campaigns scheduled and ready for when
our sale goes live
and we're able to engage with our users
let's check in with todd
who will tell you about another
messaging challenge that we tackled
using fcm topics to send timely messages
via the programmatic api
thanks mega early saturday as i'm
planning my menu for the week
i need to figure out a special dessert
to share at my scrabble game later that
evening
as i'm scrolling through our cookie now
looking for ideas it occurs to me that i
do this every saturday
and that others probably do too perhaps
there is an opportunity to send some
inspiration to people that fits their
schedule
on monday meg and i are back in the
office
video chat together we start
brainstorming a subscription push
service for recipe ideas
users can subscribe to different feeds
of recipes that can be delivered any day
of the week
mega suggests that we use fcmtopic
subscriptions to manage these messages
it keeps our infrastructure simple we
just push the messages to each topic
at the right time while fcm takes care
of managing memberships
and fanning out messages to interested
users the whole thing can be automated
pretty easily saving us time for outdoor
activities
to subscribe a device to a topic it only
takes a single asynchronous call to the
subscribe to topic function
a single call enables fcm to manage your
subscribers for you
when it comes time to send a message to
a topic you can simply call admin sdk's
set topic function
after you send a topic message to fcm
the fcm server handles fanning out
messages to each subscriber for you
those previous examples work for android
but i want to ensure this feature works
well for different users
using the fcmv1 api i can create
different messaging experiences for
different platforms
as you can see each platform gets the
upper level parameters unless overridden
in the platform specific sections below
mega is super excited to find out that
we even support watchos and wear os
maybe that can be useful when it is time
to create an awesome shopping experience
our new feature launches to an
enthusiastic audience users are happy to
control their recipe subscriptions and
happy to engage with our app's content
on their schedules
this is a good start but if we look
deeper we can find more optimizations
that we can do
to improve our app let's examine some of
those opportunities
first we'll look at using analytics
label to gather message delivery and
open counts to understand
which subscription feeds are the most
engaging
simply add the analytics label parameter
to your v1 send message calls
you can specify different labels for
each topic up to 100 labels total
after adding an analytics label we can
view the results in our reporting
dashboard
in this case i am showing the send
received and open counts for the monday
lunch subscriber base
it seems to be sending the weekly
message daily so i had better go fix the
code
i can go a step further and debug
specific message delivery issues using
bigquery
bigquery logs specific events for
individual messages
such as message acceptance and delivery
using bigquery data helped us to find
out about
direct boots impact on our app when an
android device's os is updated overnight
it is unable to receive notifications
until the device is unlocked
by adding direct boot support to our app
we are able to greet our customers when
they wake up even before the device is
unlocked
one aspect we are looking forward to
exploring is driving acquisition
of new users to our app using firebase
dynamic links
when a user wants to share a recipe we
can make it easier by including a share
button within our app
if we use firebase dynamic links the
share button can link users
directly to the in-app content they want
if a user follows a shared link that
doesn't have an app installed
it brings them to the app store to
install the app and then directly to the
shared content
this makes it easy for the end user to
consume the content with minimal hassle
and it brings additional users to our
app
fdl also drives re-engagement by
bringing idle users back into our app
naturally whenever their friends share a
new recipe
as you can see firebase dynamic links is
a
part of our diverse set of tools for
engaging and growing our user base
thanks for joining megan and i today as
we examined how our recipe app uses
firebase messaging products to engage
its users
we examined setting up campaigns using
fiam and fcm
we explored using topics to distribute
user selected content
and we investigated advanced concerns
such as direct boot analytics label
bigquery data export and firebase
dynamic links
stay safe we look forward to meeting you
in person at our next fire conference
[Music]
you