Adjust 연동

Adjust는?

Adjust는 모바일 앱 마케팅을 위한 어트리뷰션 서비스로, 광고 캠페인을 효과적으로 관리하고 분석하는 기능을 제공합니다. 사용자 획득과 유지, 그리고 전환을 위한 데이터 기반의 솔루션을 제공합니다. 특히 모바일 게임 업계에서 널리 사용되고 있습니다.

핵클과 Adjust를 연동하면 모바일 앱의 유입 정보를 사용자 속성으로 불러와서, A/B테스트 타겟팅이나 세부 분석으로 활용할 수 있습니다.

Adjust SDK 연동

Adjust와 연동하려면 Adjust SDK가 수집하는 식별자(user id)와 속성을 Hackle SDK에 전송해야 합니다.

🚧

SDK 호출 순서 보장 필요

Adjust SDK 초기화가 완료된 후에 아래 함수를 호출해야 Adjust의 정보를 정상적으로 불러올 수 있습니다. 이후에 해당 정보를 Hackle SDK로 전송하면 됩니다.

Adjust 식별자 확인

Adjust SDK를 호출하여 Adjust의 식별자를 불러올 수 있습니다. 가장 기본적인 Adjust device identifier (Adid)를 포함하여, 다양한 식별자 정보를 활용할 수 있습니다. 보다 자세한 내용은 Adjust의 공식 문서를 확인하세요. (Link)

//Adjust device identifier
string adid = Adjust.getAdid();

//ID for Advertisers
string idfa = Adjust.getIdfa();

//Google Play Services Advertising ID
Adjust.getGoogleAdId((string googleAdId) => {
   //...
}};
                     
//Amazon Advertiser ID
string amazonAdId = Adjust.getAmazonAdId();
//Adjust device identifier
String adid = Adjust.getAdid();

//Google Play Services Advertising ID
Adjust.getGoogleAdId(this, new OnDeviceIdsRead() {
    @Override
    public void onGoogleAdIdRead(String googleAdId) {}
});

//Amazon Advertiser ID
String amazonAdId = Adjust.getAmazonAdId(context);
//Adjust device identifier
let adid = Adjust.getAdid();

//Google Play Services Advertising ID
Adjust.getGoogleAdId(function(googleAdId) {
    // ...
});

//Amazon Advertiser ID
let amazonAdId = Adjust.getAmazonAdId();
//Adjust device identifier
NSString *adid = [Adjust adid];

//iOS ID for Advertisers (IDFA)
NSString *idfa = [Adjust idfa];
//Adjust device identifier
let adid = Adjust.adid()

//iOS ID for Advertisers (IDFA)
let idfa = Adjust.idfa()
//Adjust device identifier
var adid = Adjust.getAdid();

//iOS ID for Advertisers (IDFA)
Adjust.getIdfa(function(idfa) {
   // …
});

Adjust 어트리뷰션 정보 확인

Adjust SDK를 호출하여 식별자 외에도 광고 네트워크, 캠페인 등 다양한 어트리뷰션 정보를 불러올 수 있습니다. 보다 정확한 내용은 Adjust의 공식 문서를 확인하세요. (Link)

//Get current attribution information
var attribution = Adjust.getAttribution();
///Get current attribution information
AdjustAttribution attribution = Adjust.getAttribution();
///Get current attribution information
let attribution = Adjust.getAttribution();
///Get current attribution information
ADJAttribution *attribution = [Adjust attribution];
///Get current attribution information
let attribution = Adjust.attribution()
///Get current attribution information
var attribution = Adjust.getAttribution();

Hackle SDK로 식별자와 속성 전송

Hackle 연동하는 코드에 아래와 같이 Adjust에서 불러온 식별자를 속성를 커스텀 식별자, 속성으로 전송해주세요. 보다 정확한 내용은 SDK 언어별 사용자 식별자와 속성 문서를 확인하세요. (Link)

식별자 전송

원하는 식별자를 핵클 SDK에 커스텀 식별자로 전송해주세요.

// Custom Identifier
Hackle hackle = Hackle.GetInstance();

HackleUser user = new HackleUser.Builder()
    .Identifier("myCustomId", "CUSTOM_IDENTIFIER") // Custom ID
    .Build();
    
hackle.SetUser(user);
// Custom Identifier
import io.hackle.sdk.common.User
  
User user = User.builder()
    .identifier("myCustomId", "42")  // Custom ID
    .build();
  
hackleApp.setUser(user);
// Custom Identifier
HackleUserBuilder *builder = [User builder];
[builder identifier:@"myCustomId" :@"42"]; // Custom ID
User *user = [builder build];

[hackleApp setUserWithUser:user];
// Custom Identifier
let user = User.builder()
    .identifier("myCustomId", "42") // Custom ID
    .build()

hackleApp.setUser(user: user)

사용자 속성 전송

원하는 어트리뷰션 정보를 핵클 SDK에 커스텀 사용자 속성으로 전송해주세요.

// Custom User Properties 
PropertyOperations operations = new PropertyOperations.Builder()
  .Set("age", 42)
  .Set("grade", "GOLD")
  .SetOnce("sign_up_date", "2020-07-03")
  .Build();

hackle.UpdateUserProperties(operations);
// Custom User Properties 
PropertyOperations operations = PropertyOperations.builder()
    .set("age", 42)
    .set("grade", "GOLD")
    .setOnce("sign_up_date", "2020-07-03")
    .build();

hackleApp.updateUserProperties(operations);
// Custom User Properties 
PropertyOperationsBuilder *builder = [PropertyOperations builder];
[builder set:@"age" :@42];
[builder set:@"grade": @"GOLD"];
[builder setOnce:@"sign_up_date" :@"2020-07-03"];
PropertyOperations *operations = [builder build];

[hackleApp updateUserPropertiesWithOperations:operations];
// Custom User Properties 
let operations = PropertyOperations.builder()
    .set("age", 42)
    .set("grade", "GOLD")
    .setOnce("sign_up_date", "2020-07-03")
    .build()

hackleApp.updateUserProperties(operations: operations)