Wisetracker Docs
웹사이트블로그콘솔 바로가기도입 문의이용 문의
🧑‍💻 개발자 가이드
🧑‍💻 개발자 가이드
  • 와이즈트래커 개발자 가이드
  • quick start
    • 앱 광고 트래킹을 위한 필수 지식
    • SDK 설정 전 기초 진단
    • SDK 설정 후 체크리스트
      • Android
      • iOS
      • ReactNative
      • Flutter
      • Unity
      • Cordova
      • Cocos2d-x
      • Web
    • SDK 데이터 검증
    • 이벤트 발생 현황
  • SDK 연동
    • Android
      • SDK 삽입
      • 필수 이벤트 설정
      • App Link 설정
      • Android 12 ADID 변경사항
    • iOS
      • SDK 삽입
      • 필수 이벤트 설정
      • App Store '개인정보 세부 사항' 가이드
      • Universal Link 설정
    • HybridApp WebView
      • SDK 삽입
      • 필수 이벤트 설정
    • React Native
      • React Native 플러그인 연동
      • 인앱 분석 API
      • AOS 데이터 검증
      • iOS 데이터 검증
    • Flutter
      • Flutter 플러그인 연동
      • AOS 데이터 검증
      • iOS 데이터 검증
    • Unity
      • Unity 플러그인 연동
      • 인앱 이벤트 API
      • AOS 데이터 검증
      • iOS 데이터 검증
    • Website
      • Javascript SDK Integration
      • 웹사이트 이벤트 분석하기
    • CPC 광고 분석 연동
      • Web-To-App SDK 적용
      • App 으로 이동시키기
  • 앱심사 개인정보 처리 가이드
    • SDK 개인정보 처리 가이드
  • SDK 데이터 검증
    • Android 데이터 검증
    • iOS 데이터 검증
    • 웹사이트 데이터 검증
  • In-App Event
    • 인앱 이벤트 설정
      • 페이지 분석
      • 커스텀 차원(Custom Dimension)
    • 인앱 이벤트 리스트
      • Basic : 공통 이벤트
      • Messaging : 푸시/인앱 메시지
      • e-Commerce : 이커머스
      • Education : 교육
      • Travel : 여행 및 레저
      • Entertainment : 엔터테인먼트
      • Game : 게임
      • Fintech : 금융
      • Mobility : 모빌리티
    • 인앱 이벤트 태깅(Tagging)
  • Google Tag Manager 연동
    • 연동 방법
  • Server-to-Server 연동
    • 연동 방법
    • 연동 이벤트
    • 연동 데이터 요약
  • 푸시메세지 가이드
    • 앱 푸시메시지 연동
      • Android
        • FCM 인증서 설정
        • 대시보드 설정
        • SDK 설치 및 API 적용
        • 푸시 알림 데이터 이용
      • iOS
        • APNS 설정
        • 대시보드 설정
        • SDK 설치 및 API 적용
        • 푸시 알림 데이터 이용
      • React Native
        • 준비 사항 안내
        • Android 기초 설정
        • iOS 기초 설정
        • ReactNative 푸시메세지 설정
      • Flutter
        • 준비 사항 안내
        • Android 기초 설정
        • iOS 기초 설정
        • Flutter 푸시메세지 설정
    • 푸시 알림 데이터 이용
Powered by GitBook
On this page
  • 1. 인앱 이벤트 데이터 전송 ( DOT.logEvent 에 대한 처리 )
  • 2. 구매 이벤트 데이터 전송 ( DOT.logPurchase 에 대한 처리 )

Was this helpful?

  1. Server-to-Server 연동

연동 이벤트

Server-to-server 연동이 구현된 End-Point는 이벤트 데이터가 없이 전송된 데이터는 처리하지 않습니다. 즉, SESSION 데이터 그룹만 보내지는, 요청에는 아무런 응답을 하지 않으며, 반드시 logEvent, 또는 logPurchase 와 관련된 데이터가 포함되어 있어야 합니다.

1. 인앱 이벤트 데이터 전송 ( DOT.logEvent 에 대한 처리 )

SDK 사용 시에 DOT.logEvent API 함수를 사용하여 처리되던 내용을 Server-to-server에서 처리하는 방법은 다음과 같습니다. 다만, SDK에서 제공하는 API에 의한 요청과 차이점은 사용자의 단말기에서 관리되던 데이터가 Server-to-server에서는 제공될 수 없는 정보들이 있기 때문에 데이터의 처리 항목에 일부 차이가 있습니다. 아래의 2가지 예시는 "회원가입" 에 처리를 기준으로 작성된 예시이며, 다른 이벤트에 대해서도 같은 형태를 가지고 사용이 가능합니다.

curl -X POST https://trk.analytics.wisetracker.co.kr/s2s/v1/s2sDataRcv.do 
-H "Content-Type:application/json" 
-H "authToken:<SERVICE-ACCESS-TOKEN>" 
-d '{
        "SESSION":{ 
            "vtTz":  <unix time>,                               // required, current time  
            "_wtno": <SERVICE_NUMBER>,                          // required
            "advtId":"12D9505B-A48E-410A-8787-75BF39DA82F5",    // required, ADID/IDFA  
            "dSource":"SDK",                                    // required, "SDK" or "Website" ( Reserved text ) 
            "plat":"IOS"                                        // required, "AOS" or "IOS"     ( Reserved text ) 
        },
        "GOAL":{
            "vtTz":1620693013341,                                // required, current time          
            "signupTp":"email",
            "event":"w_signup_complete"
        }      
}'
Map<String, Object> eventMap = new HashMap<>();
eventMap.put("event", "w_signup_complete");
eventMap.put("signupTp", "email");
DOT.logEvent(eventMap);

2. 구매 이벤트 데이터 전송 ( DOT.logPurchase 에 대한 처리 )

SDK 사용 시에 DOT.logPurchase API 함수를 사용하여 처리되던 내용을 Server-to-server에서 처리하는 방법은 다음과 같습니다. 아래의 2가지 예시는 "구매" 이벤트 처리를 기준으로 작성된 예시입니다.

curl -X POST https://trk.analytics.wisetracker.co.kr/s2s/v1/s2sDataRcv.do 
-H "Content-Type:application/json" 
-H "authToken:<SERVICE-ACCESS-TOKEN>" 
-d '{
        "SESSION":{ 
            "vtTz":  <unix time>,                               // required, current time  
            "_wtno": <SERVICE_NUMBER>,                          // required
            "advtId":"12D9505B-A48E-410A-8787-75BF39DA82F5",    // required, ADID/IDFA  
            "dSource":"SDK",                                    // required, "SDK" or "Website" ( Reserved text ) 
            "plat":"IOS"                                        // required, "AOS" or "IOS"     ( Reserved text ) 
        },
       "REVENUE":{
               "vtTz":1620702642346,                            // required, current time
               "event":"w_purchase",                            // required, "w_purchase" or "w_first_purchase" ( Reserved text )
               "transaction_id":"TR2020111129424",              // required, Order Number     
               "currency":"KRW",                                // required, Currency    
               "product":{                                      // required
                   "product_id":"2007291158",
                   "product_name":"Leia Pleats Bag Black",
                   "quantity":2,
                   "revenue":566200
               }
       }   
}'
curl -X POST https://trk.analytics.wisetracker.co.kr/s2s/v1/s2sDataRcv.do 
-H "Content-Type:application/json" 
-H "authToken:<SERVICE-ACCESS-TOKEN>" 
-d '{
        "SESSION":{ 
            "vtTz":  <unix time>,                               // required, current time  
            "_wtno": <SERVICE_NUMBER>,                          // required
            "advtId":"12D9505B-A48E-410A-8787-75BF39DA82F5",    // required, ADID/IDFA  
            "dSource":"SDK",                                    // required, "SDK" or "Website" ( Reserved text ) 
            "plat":"IOS"                                        // required, "AOS" or "IOS"     ( Reserved text ) 
        },
       "REVENUE":{
               "vtTz":1620702642346,                            // required, current time  
               "event":"w_purchase",                            // required, "w_purchase" or "w_first_purchase" ( Reserved text )
               "transaction_id":"TR2020111129424",              // required, Order Number  
               "currency":"KRW",                                // required, Currency   
               "product":[{                                     // required   
                   "product_id":"2007291158",
                   "product_name":"Leia Pleats Bag Black",
                   "quantity":2,
                   "revenue":566200
               },{
                   "product_id":"2007291159",
                   "product_name":"Leia Pleats Bag Blue",
                   "quantity":1,
                   "revenue":1566200
               }]
       }   
}'
// 1개 상품 구매시 
Map<String, Object> purchaseMap = new HashMap<>();
purchaseMap.put("transaction_id", "TR2020111129420");
purchaseMap.put("currency", "KRW");
Map<String, Object> productMap = new HashMap<>();
productMap.put("product_id", "2007291158");
productMap.put("product_name", "Leia Pleats Bag Black");
productMap.put("quantity", 2);
productMap.put("revenue", 283100);
purchaseMap.put("product", productMap);
DOT.logPurchase(purchaseMap);
 
// 1개 이상 상품 구매시 
Map<String, Object> purchaseMap = new HashMap<>();
purchaseMap.put("transaction_id", "TR2020111129421");
purchaseMap.put("currency", "KRW");
Map<String, Object> productMap1 = new HashMap<>();
productMap1.put("product_id", "2007291158");
productMap1.put("product_name", "Leia Pleats Bag Black");
productMap1.put("quantity", 2);
productMap1.put("revenue", 566200);
Map<String, Object> productMap2 = new HashMap<>();
productMap2.put("product_id", "2005268849");
productMap2.put("product_name", "페이 스몰 숄더백 (FAYE)");
productMap2.put("quantity", 1);
productMap2.put("revenue", 1323000);
List<Map<String, Object>> productList = new ArrayList<>();
productList.add(productMap1);
productList.add(productMap2);
purchaseMap.put("product", productList);
DOT.logPurchase(purchaseMap);   
Previous연동 방법Next연동 데이터 요약

Last updated 1 year ago

Was this helpful?