Firebase
Connect Branch and Firebase to unlock a more holistic picture of the customer journey for your app.

Overview
버튼을 누르면 Branch 데이터를 Google Analytics 대시보드로 전송하여 Branch의 유저 획득 경로로서의 영향력에 대한 이해를 도울 수 있습니다. Branch를 통해 앱에 들어오는 유저의 세그먼트에 관심이 있고 다른 코호트에 대한 이벤트를 측정하려는 경우 이 안내서가 도움이 될 수 있습니다.
작동 방식
Once the Branch SDK is integrated into an app, Branch can detect which Branch Links are leading to installs, re-opens, and users' actions. Enabling this integration and completing the relevant code will result in Branch automatically forwarding referred events to Google Firebase, in the exact format Firebase expects.
Branch Events Sent to Firebase
Branch는 리퍼드(Referred) 설치, 오픈, 상거래, 콘텐츠, 유저 라이프 사이클 및 Branch로 트래킹하는 모든 커스텀 이벤트 를 보냅니다. 비 리퍼드(non-referred) 이벤트, 클릭, 웹 세션 시작 및 페이지 뷰는 제외됩니다. 또한 Branch는 UTM 태그 또는 Branch 대시보드에 설정된 필드(예 : 캠페인, 채널, 기능)에 관계없이 링크에 첨부된 분석 데이터를 전송합니다. 이를 통해 유저를 확보하고 인게이지하는 데 도움이 되는 캠페인, 채널 등을 분석할 수 있습니다.
전제 조건
In order to enable Firebase, you need to have completed the following:
- Admin access to your Branch Dashboard.
- Enabled Data Feeds for your Branch account.
- Contact your Branch account manager or visit https://branch.io/pricing
- Implemented the Branch SDK into your mobile app (iOS | Android)
- Firebase Analytics SDK
- Admin access to your Firebase account.
Enable Firebase
Firebase SDK를 통해 이벤트를 트래킹하기 전에 아래 코드 스니펫을 호출해야 합니다. 이는 Firebase의 이벤트 수를 변경하지 않지만, 데이터를 사용할 수 있는 경우 (예. 세션 또는 이벤트가 Branch에서 어트 리뷰션된 경우) Branch 어트리뷰션 데이터로 Firebase 호출을 향상시킬 수 있습니다. 이 데이터를 전달할 때 알아야 할 몇 가지 사항은 다음과 같습니다:
- Branch tracks one INSTALL event per user. You can check if
+is_first_session
is "true" in Branch's SDK callback, to confirm if the session will be tracked as an INSTALL in Branch. - Branch 프리퀀시 캡은 비 리퍼드(non-Referred) OPEN (예: 딥링크를 통해 발생하지 않은 OPEN)을 제한하므로, Branch와 Firebase 사이의 세션 카운트는 동일하지 않습니다(정확한 앱의 프리퀀시 캡 설정에 대해서는 계정 관리자에게 문의 필요). Branch에서 세션이 트래킹되지 않는 경우에도 애플리케이션에서 어트리뷰션 데이터에 계속 액세스할 수 있습니다.
Android
- Ensure you've completed the Firebase SDK implementation as documented here
- Ensure you've completed the Branch SDK implementation as documented here.
- In the
LauncherActivity#onStart() method
of the Branch Android SDK, update the implementation as below:
Branch.getInstance().getLastAttributedTouchData(
new ServerRequestGetLATD.BranchLastAttributedTouchDataListener() {
@Override
public void onDataFetched(JSONObject jsonObject, BranchError error) {
if (error == null) {
if (jsonObject != null) {
FirebaseAnalytics firebaseAnalytics = FirebaseAnalytics
.getInstance(getApplicationContext());
Bundle bundle = new Bundle();
try {
JSONObject latd = jsonObject.getJSONObject("last_attributed_touch_data").getJSONObject("data");
String feature = latd.getString("~feature");
String channel = latd.getString("~channel");
String campaign = latd.getString("~campaign");
bundle.putString("utm_medium", feature);
bundle.putString("utm_source", channel);
bundle.putString("utm_campaign", campaign);
firebaseAnalytics.logEvent("custom_event", bundle);
} catch (JSONException ignore) {
}
}
}
}
}, 30);
iOS
- Ensure you've completed the Firebase SDK implementation as documented here
- Ensure you've completed the Branch SDK implementation as documented here.
- In the
AppDelegate
of the Branch iOS SDK, update the implementation as below:
Branch.getInstance().lastAttributedTouchData(withAttributionWindow: 30) { latd in
guard let json = latd?.lastAttributedTouchJSON else { return }
if let params = json["data"] as? NSDictionary {
var firebaseParams = [String: Any]()
firebaseParams["utm_campaign"] = params["~campaign"] ?? ""
// get the link feature
firebaseParams["utm_medium"] = params["~feature"] ?? ""
// get the link channel
firebaseParams["utm_source"] = params["~channel"] ?? ""
// get the link term
firebaseParams["utm_term"] = params["~keyword"] ?? ""
Analytics.logEvent("custom_event", parameters: firebaseParams)
}
안드로이드 및/또는 iOS 용 mParticle
Branch SDK와 함께 mParticle 플러그인을 사용하는 경우, Branch 세션이 mParticle로 초기화되기 전에 Firebase가 인증되는지 확인해야 합니다. Firebase 인증 전에 mParticle을 사용하여 Branch 세션을 초기화하면 딥링크(Deep Link) 데이터가 반환되지 않습니다.
Troubleshooting
Firebase DebugView 사용
To debug the events and their metadata, you can enable the DebugView
on Firebase to verify the setup. Please refer to Google's official instructions here.

Firebase와 Branch 간에 일반적으로 나타나는 불일치
-
커스텀 이벤트의 어트리뷰션이 클릭 후 다음 세션에서 발생하는 경우 (예: 클릭 후 바로 나타나는 세션이 아님). 예를 들어, 클릭-> 앱 열기-> 앱 닫기-> 앱 열기-> 구매-> 구매가 Firebase로 전송된 경우.
The above purchase event on Branch might be attributed based on the attribution window, but on the Firebase this will always be organic as the SDK will not have the attribution data.
-
Firebase 설치에서 Google UAC (딥링킹 미지원) 및 Facebook App Install (안정적인 디퍼드 딥링크 미지원)에 대한 SAN 어트리뷰션 데이터는 누락됩니다.
NOTE
어트리뷰션 데이터 처리 및 써드파티 분석 도구 사용이 규정을 준수하는지 확인하기 위해 모든 애드 네트워크 (예: Facebook, Snap 및 Twitter)와의 계약을 검토했는지 확인하십시오.
- 계정 설정에 따라, 확률적 모델링을 통한 어트리뷰션이 비활성화된 경우일 수 있습니다. 즉, 딥링크 (Deep Link)는 링크 데이터를 반환하지만 Branch 측에서는 어트리뷰션 데이터가 기록되지 않습니다. 이 경우 계정 관리자에게 확인하십시오.
Updated 2 months ago