Segment (Export)
Overview
버튼 하나로 Branch 데이터를 Segment 대시보드로 전송하여 유저 획득 경로를 제공하는 Branch의 능력을 이해하고, 데이터를 전반적인 분석 시스템으로 추출하며, Branch 데이터 기반 커스텀 오디언스를 구축할 수 있습니다.
This documentation explains how to send Branch-referred events to Segment. If you'd like to send Segment events to your Branch dashboard, please review the Segment Import integration.
작동 방식
Branch SDK가 앱에 연동되면 Branch는 설치, 다시 오픈 및 유저 액션으로 리드하는 링크를 감지할 수 있습니다. 이 연동을 활성화하고 Segment 인증 정보를 제공하면 Branch는 Segment가 예상하는 정확한 형식으로 어트리뷰션된 이벤트를 자동으로 Segment에 전달합니다.
Branch는 어떤 이벤트를 보내나요?
Branch will send attributed installs and opens, as well as any content events, lifecycle events,custom events and commerce events you track with Branch. Non-referred events, clicks, web session starts, and pageviews will be excluded. Branch also sends all the data that is attached to the link that drove the referred event. This will allow you to analyze which campaigns, channels, etc. are helping you acquire and engage users. You can see the list of fields that we send to Segment here.
WebSDK 이벤트는 서포트되지 않습니다.
Branch WebSDK 이벤트에 대한 세그먼트 추출은 서포트되지 않습니다.
어떻게 생겼습니까?
Branch 이벤트는 세그먼트 디버거에서 앞에 branch_ 이 추가된 이벤트로 나타납니다.

또한 Live View 등에서 볼 수 있는 개별 이벤트에는 Branch 링크 데이터가 포함됩니다. 예시 :

Setup
전제 조건
- 이 가이드에는 Branch 및 Segment 모바일 SDK(들)가 이미 연동되어 있어야 합니다.
세그먼트 토큰 검색
세그먼트 토큰을 찾아 Branch 대시보드에 입력하십시오.
- Navigate to https://app.segment.com and log into the Dashboard.
- 대시보드에서 원하는 작업 공간으로 이동합니다.
- 해당 작업 영역에서 Sources 로 이동하여 앱이 나열된 소스를 선택합니다. Branch는 아직 독립 소스가 아니므로 Branch 이벤트는 앱의 소스 내에 나타납니다.

- Settings > API Keys를 클릭하십시오.

- 키와 시크릿을 복사하십시오 - 이를 일 분 안에 Branch 대시보드에 입력하십시오.
Enable the Integration
- On the Branch Dashboard (dashboard.branch.io), navigate to the Integrations page.
- 세그먼트를 검색하고 타일을 클릭합니다.
- 세그먼트 토큰을 입력하고 Enable를 누르십시오.

연동을 반드시 테스트하세요!
Branch는 부정확한 API 키에 대해 책임지지 않습니다.
패스 세그먼트 익명 ID
When you're ready to send data through Branch, you'll need to make sure you pass through the configured Segment Anonymous ID the Branch SDKs. In order to do so, you'll ask the Segment SDK to provide you with the Segment Anonymous ID, and pass this value through setRequestMetadataKey
on the Branch SDKs.
Here's a sample snippet showing this. NOTE you must set the correct key before calling sessionBuilder()...init()
. You must also initialize the Segment SDK before setting the request metadata in the Branch SDK.
iOS
Inside didFinishLaunchingWithOptions
Branch *branch = [Branch getInstance];
[[Branch getInstance] setRequestMetadataKey:@"$segment_anonymous_id" value:[[SEGAnalytics sharedAnalytics] getAnonymousId]];
Swift
Inside didFinishLaunchingWithOptions
if let branch = Branch.getInstance() {
branch.setRequestMetadataKey("$segment_anonymous_id", value:"1234" as NSObject!);
}
Android
Application#onCreate 또는 Deep Link Activity의 #onCreate에서 초기화하기 전에.
Branch.getInstance().setRequestMetadata("$segment_anonymous_id", com.segment.analytics.Analytics.with(this).getAnalyticsContext().traits().anonymousId());
...
Branch.sessionBuilder(this)...init();"
In the above snippet, this
is the Activity context.
고급
Branch가 세그먼트로 보내는 것
Property | 값 | 출처 | 예시 |
---|---|---|---|
event | Branch 이벤트 | event name | branch_OPEN |
event_id | 이벤트의 유니크 ID | Branch 이벤트 ID | 469939270182891107 |
properties | Branch 링크 데이터 사전 | 이벤트가 어트리뷰션된 링크에 대한 라스트 어트리뷰션 터치 데이터 | "campaign": "Segment test", "channel": "Slack" |
device_info | OS와 같은 디바이스 데이터 | 디바이스를 위한 Branch User Data | "os": "ANDROID" |
anonymousId | 세그먼트 익명 ID | 세그먼트 SDK 제공 익명 ID | 12356 |
IP | 이벤트의 IP | 디바이스 | 192.82.115.928 |
위의 모든 속성은 플랫으로 수신됩니다. properties[key], even though some are stored as dictionaries in Branch. They are grouped in our documentation for legibility.