Adjust SDK와 Sociomantic 이벤트를 연동할 수 있습니다.
환경 설정
Maven
Maven을 사용하는 경우, build.gradle
파일에 다음의 디펜던시를 추가하시기 바랍니다.
implementation 'com.adjust.sdk:adjust-android:4.38.5'
implementation 'com.adjust.sdk:adjust-android-criteo:4.38.5'
JAR
배포 페이지에서 플러그인을 JAR 파일로 추가하는 것도 가능합니다.
Sociomantic 이벤트
Sociomantic 플러그인 설치가 완료되면, Sociomantic 이벤트 메서드와 다음의 상수에 액세스할 수 있습니다. 이를 딕셔너리의 속성 이름으로 사용해야 합니다.
final static String SCMCategory;
final static String SCMProductName;
final static String SCMSalePrice;
final static String SCMAmount;
final static String SCMCurrency;
final static String SCMProductURL;
final static String SCMProductImageURL;
final static String SCMBrand;
final static String SCMDescription;
final static String SCMTimestamp;
final static String SCMValidityTimestamp;
final static String SCMQuantity;
final static String SCMScore;
final static String SCMProductID;
final static String SCMActionConfirmed;
final static String SCMCustomerAgeGroup;
final static String SCMCustomerEducation;
final static String SCMCustomerGender;
final static String SCMCustomerID;
final static String SCMCustomerMHash;
final static String SCMCustomerSegment;
final static String SCMCustomerTargeting;
final static String SCMTransaction;
Sociomantic 이벤트 전송 전에, 다음과 같이 파트너 ID를 설정해야 합니다.
import com.adjust.sdk.plugin.AdjustSociomantic;
AdjustSociomantic.injectPartnerIdInSociomanticEvents("{sociomanticPartnerId}");
파트너 ID 설정이 완료되면, 다른 Sociomantic 이벤트를 연동할 수 있습니다.
예시
커스텀 이벤트
import com.adjust.sdk.plugin.AdjustSociomantic;
AdjustEvent event = new AdjustEvent(HOMEPAGE_TOKEN);
Map<String, String> customerData = new HashMap<>();
customerData.put(AdjustSociomantic.SCMCustomerAgeGroup, "0");
AdjustSociomantic.injectCustomerDataIntoEvent(event, customerData);
Adjust.trackEvent(event);
홈 페이지 보기
import com.adjust.sdk.plugin.AdjustSociomantic;
AdjustEvent event = new AdjustEvent(HOMEPAGE_TOKEN);
Adjust.trackEvent(event);
목록 보기
import com.adjust.sdk.plugin.AdjustSociomantic;
AdjustEvent event = new AdjustEvent(LISTING_TOKEN);
List<string> categories = Arrays.asList("cat1", "cat2", "cat3");
String date = "1427792434"
AdjustSociomantic.injectViewListingIntoEvent(event, categories);
Adjust.trackEvent(event);
// You also can provide a date like this.
AdjustSociomantic.injectViewListingIntoEvent(event, categories, date);
Adjust.trackEvent(event);
상품 보기
import com.adjust.sdk.plugin.AdjustSociomantic;
AdjustEvent event = new AdjustEvent(PRODUCT_VIEW_TOKEN);
Map<String, Object> product = new HashMap<>();
List<string> categories = Arrays.asList("cat1", "cat2", "cat3");
product.put(AdjustSociomantic.SCMCategory, categories);
AdjustSociomantic.injectProductIntoEvent(event, "123456");
Adjust.trackEvent(event);
// You can also provide product information.
AdjustSociomantic.injectProductIntoEvent(event, "123456", product);
Adjust.trackEvent(event);
이용 가능한 제품 파라미터
파라미터 이름 | 필수 요건 | 설명 | 참고 |
---|
SCMCategory | 필수 | 제품 카테고리(전체 카테고리 위치값) | 카테고리나 목록 페이지의 트래킹 코드에 제공된 카테고리 정보는 피드나 제품 페이지의 트래킹 코드에 제공된 카테고리 정보와 일치해야 합니다. |
SCMProductName | 필수 | 제품 이름 | 특수문자는 암호화되면 안되며, 올바른 UTF-8 형식으로 제공되어야 합니다. HTML markup을 사용하지 마시기 바랍니다. |
SCMSalePrice | 필수 | 소수값의 판매 금액(예: 2.99) | 소수점을 사용하고, 1000단위에 쉼표를 사용하지 마시기 바랍니다. |
SCMAmount | 필수 | 소수값의 일반 금액(예: 3.99) | 소수점을 사용하고, 1000단위에 쉼표를 사용하지 마시기 바랍니다. |
SCMCurrency | 필수 | ISO 4217 형식의 통화 코드(예: EUR) | 고정 통화 코드. 트래킹 코드 예시에서 사용자에게 제공되어야 함. |
SCMProductURL | 필수 | 제품 URL(딥링크) | 올바르게 작동하는 딥링크를 제공하시기 바랍니다. 클릭 트래킹 파라미터(Google Analytics, HURRA, Eulerian 등)가 없는 것이 이상적입니다. 항상 다음 항목과 함께 딥링크를 사용합니다. http:// |
SCMProductImageURL | 필수 | 제품 이미지 URL | 합리적인 크기의 이미지를 제공하시기 바랍니다. 광고에서 가장 잘 나타나려면 최소 200x200px 해상도에, 동일한 이미지 비율을 갖고 있어야 합니다. |
SCMBrand | 필수 | 제품 브랜드 | 특수문자는 암호화되면 안되며, 올바른 UTF-8 형식으로 제공되어야 합니다(위 SCMProductName과 동일). HTML markup을 사용하지 마시기 바랍니다. |
SCMDescription | 선택 | 간략한 제품 묘사 | 특수문자는 암호화되면 안되며, 올바른 UTF-8 형식으로 제공되어야 합니다(위 SCMProductName과 동일). HTML markup을 사용하지 마시기 바랍니다. |
SCMTimestamp | 선택 | 제품이 언제까지 구매 가능한지를 보여주는 타임스탬프(GMT 시간) | 방문자가 검색한 날짜를 제공하시기 바랍니다. 이는 NSNumber 내에 래핑되어 있는 NSTimeInterval여야 합니다. (예시 참조) |
SCMValidityTimestamp | 선택 | 제품이 언제까지 구매 가능한지를 보여주는 타임스탬프(GMT 시간) | 제품이 언제까지 구매 가능한지 unix 타임스탬프를 제공하시기 바랍니다. 항상 구매 가능한 제품에는 0을 사용합니다. 이는 NSNumber 내에 래핑되어 있는 NSTimeInterval여야 합니다. (위 SCMTimestamp와 동일) |
SCMQuantity | 선택 | 제품의 재고량 | Sociomantic 담당자와 의논 후에 이 필드를 연동하시기 바랍니다. |
SCMScore | 선택 | 제품의 우선순위 점수(값 범위는 0~10.0) | Sociomantic 담당자와 의논 후에 이 필드를 연동하시기 바랍니다. |
Cart
import com.adjust.sdk.plugin.AdjustSociomantic;
AdjustEvent event = new AdjustEvent(BASKET_TOKEN);
Map<String, Object> product1 = new HashMap<>();
product1.put(AdjustSociomantic.SCMProductID, "1");
product1.put(AdjustSociomantic.SCMAmount, 42);
product1.put(AdjustSociomantic.SCMCurrency, "EUR");
product1.put(AdjustSociomantic.SCMQuantity, 1);
Map<String, Object> product2 = new HashMap<>();
product2.put(AdjustSociomantic.SCMProductID, "2");
List<object> products = Arrays.asList(product1, product2, product3);
AdjustSociomantic.injectCartIntoEvent(event, products);
Adjust.trackEvent(event);
이용 가능한 장바구니 파라미터
파라미터 이름 | 필수 요건 | 설명 | 참고 |
---|
SCMProductID | 필수 | 제품 ID | 색상이나 사이즈에 대한 subID를 제외한 제품 ID를 제공하시기 바랍니다. |
SCMAmount | 선택 | 소수값의 제품 가격(예: 2.99) | 소수점을 사용하고, 1000단위에 쉼표를 사용하지 마시기 바랍니다. 제품당 가격을 제공하시기 바랍니다. 수량이 1보다 큰 값을 갖고 있을 때도 적용됩니다. |
SCMCurrency | 선택 | ISO 4217 형식의 통화 코드(예: EUR) | 고정 통화 코드. 트래킹 코드 예시에서 사용자에게 제공되어야 함. |
SCMQuantity | 선택 | 선택한 제품의 수량 | 정수 값을 사용합니다. |
확인되지 않은 트랜잭션
import com.adjust.sdk.plugin.AdjustSociomantic;
AdjustEvent event = new AdjustEvent(SALE_TOKEN);
Map<String, Object> product1 = new HashMap<>();
product1.put(AdjustSociomantic.SCMProductID, "1");
product1.put(AdjustSociomantic.SCMAmount, 42);
product1.put(AdjustSociomantic.SCMQuantity, 1);
Map<String, Object> product2 = new HashMap<>();
product2.put(AdjustSociomantic.SCMProductID, "2");
List<object> products = Arrays.asList(product1, product2, product3);
AdjustSociomantic.injectTransactionIntoEvent(event, "123456", products);
Adjust.trackEvent(event);
또는 파라미터와 함께:
import com.adjust.sdk.plugin.AdjustSociomantic;
AdjustEvent event = new AdjustEvent(SALE_TOKEN);
Map<String, Object> product1 = new HashMap<>();
product1.put(AdjustSociomantic.SCMProductID, "1");
product1.put(AdjustSociomantic.SCMAmount, 42);
product1.put(AdjustSociomantic.SCMQuantity, 1);
Map<String, Object> product2 = new HashMap<>();
product2.put(AdjustSociomantic.SCMProductID, "2");
List<object> products = Arrays.asList(product1, product2, product3);
Map<String, Object> parameters = new HashMap<>();
parameters.put(AdjustSociomantic.SCMCurrency, "EUR");
parameters.put(AdjustSociomantic.SCMAmount, 42);
AdjustSociomantic.injectTransactionIntoEvent(event, "123456", products, parameters);
Adjust.trackEvent(event);
확인된 트랜잭션
import com.adjust.sdk.plugin.AdjustSociomantic;
AdjustEvent event = new AdjustEvent(SALE_TOKEN);
Map<String, Object> product1 = new HashMap<>();
product1.put(AdjustSociomantic.SCMProductID, "1");
product1.put(AdjustSociomantic.SCMAmount, 42);
product1.put(AdjustSociomantic.SCMQuantity, 1);
Map<String, Object> product2 = new HashMap<>();
product2.put(AdjustSociomantic.SCMProductID, "2");
List<object> products = Arrays.asList(product1, product2, product3);
AdjustSociomantic.injectConfirmedTransactionIntoEvent(event, "123456", products);
Adjust.trackEvent(event);
또는 파라미터와 함께:
import com.adjust.sdk.plugin.AdjustSociomantic;
AdjustEvent event = new AdjustEvent(SALE_TOKEN);
Map<String, Object> product1 = new HashMap<>();
product1.put(AdjustSociomantic.SCMProductID, "1");
product1.put(AdjustSociomantic.SCMAmount, 42);
product1.put(AdjustSociomantic.SCMQuantity, 1);
Map<String, Object> product2 = new HashMap<>();
product2.put(AdjustSociomantic.SCMProductID, "2");
List<object> products = Arrays.asList(product1, product2, product3);
Map<String, Object> parameters = new HashMap<>();
parameters.put(AdjustSociomantic.SCMCurrency, "EUR");
parameters.put(AdjustSociomantic.SCMAmount, 42);
AdjustSociomantic.injectConfirmedTransactionIntoEvent(event, "123456", products, parameters);
Adjust.trackEvent(event);
이용 가능한 장바구니 파라미터
파라미터 이름 | 필수 요건 | 설명 | 참고 |
---|
SCMAmount | 선택 | 소수값의 제품 가격(예: 2.99) | 소수점을 사용하고, 1000단위에 쉼표를 사용하지 마시기 바랍니다. 제품당 가격을 제공하시기 바랍니다. 수량이 1보다 큰 값을 갖고 있을 때도 적용됩니다. |
SCMCurrency | 선택 | ISO 4217 형식의 통화 코드(예: EUR) | 고정 통화 코드. 트래킹 코드 예시에서 사용자에게 제공되어야 함. |
SCMQuantity | 선택 | 선택한 제품의 수량 | 정수 값을 사용합니다. |
리드 이벤트
import com.adjust.sdk.plugin.AdjustSociomantic;
AdjustEvent event = new AdjustEvent(LEAD_TOKEN);
AdjustSociomantic.injectLeadIntoEvent(event, "123456");
Adjust.trackEvent(event);
또는 컨펌된 리드:
import com.adjust.sdk.plugin.AdjustSociomantic;
AdjustEvent event = new AdjustEvent(LEAD_TOKEN);
AdjustSociomantic.injectLeadIntoEvent(event, "123456", Boolean.TRUE);
Adjust.trackEvent(event);