앱 스토어 및 플레이 스토어 구독을 기록한 후 Adjust SDK로 유효성을 검증할 수 있습니다. 사용자가 구독을 구매한 뒤 상세 내용을 담은 AdjustAppStoreSubscription 또는 AdjustPlayStoreSubscription 인스턴스를 생성하시기 바랍니다.
1. 구독 객체 인스턴스화
시작하려면 구독 구매에 대한 세부 정보가 포함된 구독 객체를 생성해야 합니다.
AdjustAppStoreSubscription ( String _price, String _currency, String _transactionId)
다음 속성을 포함하는 AdjustAppStoreSubscription 객체를 생성합니다.
| 파라미터 | 데이터 유형 | 설명 | | --------------- | --------- | -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- -------------------------------------- | --- | | price | String | 구독 요금 | | currency | String | 구독 통화. priceLocale 객체의 currencyCode 로 형식화됨 |
|transactionId | String | | 트랜잭션 ID | |
AdjustAppStoreSubscription subscription = new AdjustAppStoreSubscription (
AdjustPlayStoreSubscription ( String _price, String _currency, String _sku, String _orderId, String _signature, String _purchaseToken)
다음 속성을 포함하는 AdjustPlayStoreSubscription 객체를 생성합니다.
파라미터 데이터 유형 설명 priceString구독료 currencyString구독 통화 skuString제품 ID orderIdString거래 ID signatureString구매 데이터의 서명 purchaseTokenString거래의 고유 토큰. 자세한 정보는 Google 문서 를 참조하시기 바랍니다.
AdjustPlayStoreSubscription subscription = new AdjustPlayStoreSubscription (
구매일 기록
사용자가 구독을 구매한 날짜를 기록할 수 있습니다. SDK는 리포트할 수 있도록 이 데이터를 반환합니다.
AdjustAppStoreSubscription 클래스에transactionDate 속성을 추가합니다.
subscription 인스턴스의 transactionDate 속성에 타임스탬프를 설정하면 사용자가 구독을 결제한 날을 기록할 수 있습니다.
AdjustAppStoreSubscription subscription = new AdjustAppStoreSubscription (
subscription.transactionDate = 'transactionDate' ;
AdjustPlayStoreSubscription 클래스에purchaseTime 속성을 추가합니다.
subscription 인스턴스의 purchaseTime 속성에 타임스탬프를 설정하면 사용자가 구독을 결제한 날을 기록할 수 있습니다.
AdjustPlayStoreSubscription subscription = new AdjustPlayStoreSubscription (
subscription.purchaseTime = 'purchase-time' ;
구매 지역 기록(iOS만 해당)
사용자가 구독을 구매한 지역을 기록할 수 있습니다. 이를 위해 구독 객체의 setSalesRegion 메서드를 호출하고 국가 코드를 String로 전달합니다. 이는 Storefront 객체의 countryCode 로 포맷되어야 합니다.
AdjustAppStoreSubscription subscription = new AdjustAppStoreSubscription (
subscription.salesRegion = 'sales-region' ;
콜백 파라미터 추가
콜백 파라미터를 구독 객체에 추가할 수 있습니다. Adjust는 이러한 파라미터를 콜백 URL에 첨부합니다. 콜백 파라미터를 추가하려면 구독 객체의 addCallbackParameter 메서드를 호출합니다. 이 메서드를 여러 번 호출하여 여러 콜백 매개 변수를 추가할 수 있습니다.
void addCallbackParameter ( String key, String value)
AdjustAppStoreSubscription subscription = new AdjustAppStoreSubscription (
subscription. addCallbackParameter ( 'key1' , 'value1' );
subscription. addCallbackParameter ( 'key2' , 'value2' );
void addCallbackParameter ( String key, String value)
AdjustPlayStoreSubscription subscription = new AdjustPlayStoreSubscription (
subscription. addCallbackParameter ( 'key1' , 'value1' );
subscription. addCallbackParameter ( 'key2' , 'value2' );
파트너 파라미터 추가
Adjust에서는 파트너 파라미터를 구독 객체에 추가할 수 있습니다. SDK는 사용자가 구독을 구매할 때 이를 Adjust 서버로 전송합니다. 이후 Adjust 서버는 해당 정보를 네트워크 파트너에게 전달합니다. 파트너 파라미터를 추가하려면 구독 객체의 addPartnerParameter 메서드를 호출합니다. 이 메서드를 여러 번 호출하여 여러 개의 파트너 파라미터를 추가할 수 있습니다.
void addPartnerParameter ( String key, String value)
AdjustAppStoreSubscription subscription = new AdjustAppStoreSubscription (
subscription. addPartnerParameter ( 'key1' , 'value1' );
subscription. addPartnerParameter ( 'key2' , 'value2' );
void addPartnerParameter ( String key, String value)
AdjustPlayStoreSubscription subscription = new AdjustPlayStoreSubscription (
subscription. addPartnerParameter ( 'key1' , 'value1' );
subscription. addPartnerParameter ( 'key2' , 'value2' );
구독 객체를 설정하고 나면 Adjust SDK를 사용하여 기록을 시작할 수 있습니다.
static void trackAppStoreSubscription ( AdjustAppStoreSubscription subscription)
구독 객체를 trackAppStoreSubscription 메서드로 전달하여 사용자의 구독 구매를 기록합니다.
AdjustAppStoreSubscription subscription = new AdjustAppStoreSubscription (
subscription.transactionDate = 'transactionDate' ;
subscription.salesRegion = 'salesRegion' ;
subscription. addCallbackParameter ( 'key1' , 'value1' );
subscription. addCallbackParameter ( 'key2' , 'value2' );
subscription. addPartnerParameter ( 'key1' , 'value1' );
subscription. addPartnerParameter ( 'key2' , 'value2' );
Adjust . trackAppStoreSubscription (subscription);
static void trackPlayStoreSubscription ( AdjustPlayStoreSubscription subscription)
구독 객체를 trackPlayStoreSubscription 메서드로 전달하여 사용자의 구독 구매를 기록합니다.
AdjustPlayStoreSubscription subscription = new AdjustPlayStoreSubscription (
subscription.purchaseTime = 'purchase-time' ;
subscription. addCallbackParameter ( 'key1' , 'value1' );
subscription. addCallbackParameter ( 'key2' , 'value2' );
subscription. addPartnerParameter ( 'key1' , 'value1' );
subscription. addPartnerParameter ( 'key2' , 'value2' );
Adjust . trackPlayStoreSubscription (subscription);