Add Google Analytics for Firebase to your instant app

Tracking the success of an app, instant or installed, is important to each
developer. Several analytics libraries are compatible with
Google Play Instant, including
Fabric Answers,
Localytics,
and Mixpanel.

If your current analytics solution isn't listed or if you find that it doesn't
work with Google Play Instant, consider using Google Analytics for Firebase as
your telemetry solution. This page describes how to set up Google Analytics for Firebase
in an instant app project.

Differentiating between installed and instant app data

Because both your installed and your instant app share a package name, you
may want to differentiate the events and data collected from each. To
differentiate your instant and installed apps in Analytics, set
a app_type user property, with the value "instant" for the instant app and
"installed" for the installed app.

Note: Both the instant app and the installed app need to implement the
app_type user property. Further, you must publish the installed app that
contains app_type before the instant app. Otherwise,
Analytics logs installed app events to the instant app
when users install the app.

Once you set the app_type user property, you can select an event in the
Analytics console's Events tab and then filter the event by the
app_type value. The resulting data projection gives you a count for the
specified event in your instant or installed app.

For more information about how to log and view events in Google Analytics for Firebase,
see Log Events.

Interpreting Analytics events

Analytics allows you to track a variety of metrics valuable
to an instant app. The following table describes relevant metrics for your
instant app, including the corresponding event name or property in
Analytics.