To help you gauge the effectiveness of your promotions and campaigns, Firebase Dynamic Links provides several ways to view analytics data and integrate with analytics tools.
Firebase Dynamic Links records events related to your Dynamic Links' performance, including events that happen outside of your apps, such as the number of times someone clicks on one of your short Dynamic Links. This data can be viewed in the Dynamic Links section of the Firebase console and retrieved using a REST API.
Dynamic Links also work with Google Analytics. Google Analytics provides detailed statistics for events that happen in your app, such as when someone opens your app by clicking a Dynamic Link. This data can be viewed in the Analytics section of the Firebase console.
The following table summarizes the features of these two analytics options:
Firebase Dynamic Links analytics | Google Analytics | |
---|---|---|
Events tracked |
|
|
Data access |
|
|
Custom campaign attribution ( utm_ parameters) |
Both analytics options track in-app events that web-based tracking tools often miss. For example, when a Dynamic Link is opened on iOS as a Universal Link, the link is opened directly by the app, bypassing web analytics; these events are correctly tracked by both Firebase Dynamic Links analytics and Google Analytics.
Firebase Dynamic Links analytics
Firebase Dynamic Links tracks the number of times each of your short Dynamic Links have been clicked, as well as the number of times a click resulted in a redirect, app install, app first-open, or app re-open. You can view these statistics in the Firebase console or retrieve them with a REST API.
Event | Description | Firebase console | REST API |
---|---|---|---|
CLICK | Count of any click on a Dynamic Link, irrespective to how it is handled and its destinations | ||
REDIRECT | Count of attempts to redirect users, either to the App Store or Play Store to install or update the app, or to some other destination | ||
APP_INSTALL | Count of actual installs (only supported by the Play Store) | ||
APP_FIRST_OPEN | Count of first-opens after an install | ||
APP_RE_OPEN | Number of times the Dynamic Link caused an app to be re-opened |
Firebase console
In the Firebase console, you can view event counts for each short Dynamic Link you created in the console.
REST API
To get event counts for any of your short Dynamic Links, whether you created the link in the console or programmatically, you can use the Dynamic Links Analytics REST API.
An API call looks like the following example HTTP request:
GET https://firebasedynamiclinks.googleapis.com/v1/https%3A%2F%2Fexample.page.link%2FwXYz/linkStats?durationDays=7 Authorization: Bearer ya29.Abc123...
The response to a request is a JSON object like the following:
{
"linkEventStats": [
{
"platform": "ANDROID",
"count": "123",
"event": "CLICK"
},
{
"platform": "IOS",
"count": "123",
"event": "CLICK"
},
{
"platform": "DESKTOP",
"count": "456",
"event": "CLICK"
},
{
"platform": "ANDROID",
"count": "99",
"event": "APP_INSTALL"
},
{
"platform": "ANDROID",
"count": "42",
"event": "APP_FIRST_OPEN"
},
...
]
}
Google Analytics
You can also use Google Analytics in your app to track the performance of your Dynamic Links. The following Analytics events are automatically logged when you open a short or long Dynamic Link in your app.
Analytics events | |
---|---|
dynamic_link_first_open | Logged when a user opens the app for the first time via a Dynamic Link. |
dynamic_link_app_open | Logged when a user re-opens the app via a Dynamic Link. |
dynamic_link_app_update | Logged when the app is updated to a new version via a Dynamic Link. Android only. |
You can then view the logged data in the Analytics section of the Firebase console.
Google Analytics" class="screenshot">
If you mark Dynamic Link events as conversions, you can see how your Dynamic Links are performing on the Attribution page.
Google Analytics and Apple App Analytics campaign parameters
You use Dynamic Links with your existing Google Analytics custom campaigns and iTunes Connect App Analytics campaigns by specifying campaign parameters when you create a Dynamic Link. When a user opens a Dynamic Link with campaign parameters specified, the campaign parameters are passed on to Google Analytics or the App Store.
By adding these tracking parameters to your Dynamic Links, Google Analytics and iTunes Connect can treat them like any other campaign it's measuring attribution reporting for, and you can view conversion events not just by the ad campaigns responsible for bringing in those users, but also by which Dynamic Links might have brought them in.
The following parameters are passed to Google Analytics: utm_source
,
utm_medium
, utm_campaign
, utm_term
, utm_content
.
The following parameters are passed to the App Store: at
, ct
, mt
, pt