Segment (Import)
Overview
Segment에서 Branch로 이벤트를 보내면 웹 및 에서의 구매와 같은 다운스트림 전환이 Branch 링크 클릭으로 어트리뷰션될 수 있습니다. Segment에서 Branch로 가져온 이벤트는 대시보드 시각화, Data Feeds (데이터 연동), Universal Ads(광고 어트리뷰션) 포스트백, Journeys (웹-투-앱 스마트배너) 타겟팅, Liveview 등 Branch 내에서 일반적으로 이벤트를 사용할 수 있는 모든 곳에서 사용할 수 있습니다.
This guide walks through the server-side integration for data import from Segment to Branch. For data export from Branch to Segment, go here.
Branch는 어떤 이벤트를 가져옵니까?
Branch will import events that are not auto-tracked with the Branch SDKs. This includes commerce, content, user lifecycle, and custom events, and excludes events like clicks and installs. See the full list of supported events and associated mappings here. Branch will only import events that can be tied to a user.
Setup
- Contact Branch to configure Branch to receive events from Segment. Please note that a subscription to Data Feeds is required to enable data import from Segment to Branch.
- Navigate to the Data Integrations page of the Branch dashboard.
- 왼쪽 메뉴에서 Segment을 선택합니다.
- 이벤트를 가져올 플랫폼을 선택하고 Save를 클릭하십시오.

- 세그먼트 UI의 대상 페이지로 이동합니다.
- Add Destination를 클릭하십시오.
- 대상 카탈로그(Destinations Catalog)에서 Branch를 검색하고 연결하려는 Source를 확인하십시오.
- Enter your Branch Key. This can be found in the Account Settings > App section of the Branch dashboard.
- Enter your Branch Secret. This can be found in the Account Settings > App section of the Branch dashboard.
서버 사이드 이벤트 가져오기의 경우, SDK 연동 지침을 무시할 수 있습니다.
중복 데이터 방지
To avoid duplicate data, you should either track conversion events directly with Branch or track events with Segment and then enable import to Branch, not both. Branch will warn you if you try to import events to Branch that you are already tracking.
트래킹
The Branch integration supports some of the events tracked with Segment’s Track method. The track API call is how you record any actions your users perform, along with any properties that describe the action.
각 액션을 이벤트라고 합니다. 각 이벤트에는 Registered와 같은 이름과 속성이 있습니다. 예를 들어 Registered 이벤트에는 plan 또는 accountType과 같은 속성이 있을 수 있습니다. 다음은 가장 일반적인 필드가 제거된 일반적인 트랙 호출의 페이로드입니다:
{
"type": "track",
"event": "Registered",
"properties": {
"plan": "Pro Annual",
"accountType" : "Facebook"
}
}
위의 페이로드를 생성하는 해당 자바 스크립트 이벤트는 다음과 같습니다:
analytics.track("Registered", {
plan: "Pro Annual",
accountType: "Facebook"
});
See Segment's Track documentation for more details and examples.
서포트되는 이벤트
Branch는 아직 Branch SDK로 자동 트래킹되지 않은 Segment의 이벤트만 가져옵니다. 이는 클릭 및 설치와 같은 이벤트를 가져올 수 없음을 의미합니다. 다음은 Segment 이벤트를 어떻게 Branch 이벤트에 매핑하고 Branch로 불러오는지에 대한 개요입니다.
세그먼트 이벤트 | Branch 이벤트 | Branch 이벤트 카테고리 | 불러옴 |
---|---|---|---|
Product Added | Add To Cart | Commerce Event | 예 |
Product Added to Wishlist | Add To Wishlist | Commerce Event | 예 |
Cart Viewed | View Cart | Commerce Event | 예 |
Payment Info Entered | Add 결제 정보 | Commerce Event | 예 |
Checkout Started | Initiate Purchase | Commerce Event | 예 |
Order Completed | Purchase | Commerce Event | 예 |
Branch 이벤트 이름 사용 | Spend Credits | Commerce Event | 예 |
Products Searched | Search | Content Event | 예 |
Product Viewed | View Item | Content Event | 예 |
Product List Viewed | View Items | Content Event | 예 |
Product Reviewed | Rate | Content Event | 예 |
Product Shared | Share | Content Event | 예 |
Branch 이벤트 이름 사용 | Complete Registration | Lifecycle Event | 예 |
Branch 이벤트 이름 사용 | Complete Tutorial | Lifecycle Event | 예 |
Branch 이벤트 이름 사용 | Achieve Level | Lifecycle Event | 예 |
Branch 이벤트 이름 사용 | Unlock Achievement | Lifecycle Event | 예 |
모든 이벤트 이름 | Custom | Custom Event | 예 |
Deep Link Clicked | Click | - | 아니오 |
Install Attributed | Install | - | 아니오 |
- | SMS Sent | - | 아니오 |
- | Pageview | - | 아니오 |
- | Web Session Start | - | 아니오 |
- | Branch CTA View | - | 아니오 |
- | Impression | - | 아니오 |
Application Installed | - | - | 아니오 |
Application Opened | - | - | 아니오 |
Application Updated | - | - | 아니오 |
Application Backgrounded | - | - | 아니오 |
Application Crashed | - | - | 아니오 |
Application Uninstalled | - | - | 아니오 |
Push Notification Received | - | - | 아니오 |
Push Notification Tapped | - | - | 아니오 |
Push Notification Bounced | - | - | 아니오 |
앱 이벤트 식별자
이벤트를 Branch로 불러오려면 식별자가 필요합니다. 다음을 포함해야 합니다:
- context.device.advertisingId AND context.os.name OR
- context.device.id AND context.os.name OR
Branch는 Segment의 식별자를 다음에 매핑합니다.
세그먼트 필드 | Branch 필드 |
---|---|
userId | developer_identity |
context.device.advertisingId | idfa or aaid |
context.device.id | idfv or android_id |
context.os.name | os |
If using User ID with Segment, Branch will automatically map this to developer identity. See Developer Identity Instructions for ( iOS | Android )
Check out Segment's User ID docs for more details.
Branch does not map Segment's anonymous ID to any field, and will not attribute logged out web events received from the server-to-server integration. Anonymous ID can still be attached to events.
웹 이벤트 식별자
In order to attribute accurately on web it is important to collect the Branch SDK's browser fingerprint and pass it to the Segment track function. Branch uses this along with the userAgent
collected by the Segment SDK to identify the user's persona, platform, os and other parameters. Collecting the browser fingerprint can be done with the following code snippet:
로그인된 웹 이벤트 전용
Branch는 익명 ID를 전달하더라도 Segment에 대해 로그아웃된 웹 이벤트를 어트리뷰션하지 않습니다.
const loadBranchAndGetFingerprint = new Promise(function(resolve, reject) {
branch.init('BRANCH_KEY', {}, function(err, data) {
branch.getBrowserFingerprintId(function(err, fingerprint) { // fetch the browser fingerprint from the SDK
if (!!err) {
reject(err);
return;
}
resolve({...data, fingerprint});
});
});
});
그런 다음 세그먼트 트래킹 이벤트의 페이로드로 이를 전달할 수 있습니다.
loadBranchAndGetFingerprint.then(function(data) {
const { fingerprint } = data;
// Load the Segment SDK and initialize with key here
// Segment track request
analytics.track('Order Completed', {
browser_fingerprint_id: fingerprint // add the browser fingerprint to the Segment track event
//... Other event details ...
})
});
연동 검증
Segment와 Branch에서 모두 불러오기를 설정하면 이벤트가 발생합니다. Branch에서 이벤트를 본 경우 불러오기 카드에 녹색 점이 표시됩니다.

To see more information on the events that are coming in, you can look at events with origin SEGMENT
in Liveview:

Branch imports events from Segment as commerce, user lifecycle, content, or custom events.
가져온 이벤트 사용
세그먼트에서 Branch로 가져온 이벤트는 일반적으로 Branch 내에서 이벤트를 사용할 수있는 모든 곳에서 사용할 수 있습니다. 여기에는 대시보드 시각화, Data Feeds 솔루션 (데이터 연동, 쿼리 API, 웹훅 및 일일 추출 API 포함), Universal Ads 포스트백, Journeys (웹-투-앱 스마트배너) 타게팅, Liveview 등이 포함됩니다.
고급
이벤트에 익명 ID 첨부
Events imported from Segment with anonymous ID attached will retain that value on the event, and will be available in the custom_data field if exported back out from Branch. To attach anonymous ID to events auto-tracked by Branch (installs, opens, etc.), follow the instructions here.
웹에서 로그아웃한 유저에 대한 어트리뷰션
Branch는 웹에서 로그아웃한 유저에 대해 내부용 커스텀 식별자를 사용합니다. Segment에서 Branch로 서버 간 연동을 활성화하면 Segment에서 로그아웃된 웹 이벤트를 Branch로 실행되는 캠페인에 어트리뷰션할 수 없습니다. 이러한 이유로 Branch 웹 SDK를 사용하여 웹 이벤트를 직접 트래킹하는 동시에 Segment에서 서버로 앱 이벤트 서버를 보낼 수 있습니다. 그런 다음 Branch를 사용하면 웹 이벤트 가져오기를 해제하여 데이터 중복을 방지할 수 있습니다.