連携を開始する前に、あなたのデータの一部を使用するための条件をお読みください。
Adjust SDKとMixpanel SDKを連携するには、以下の手順に従ってください。
事前準備
この機能を利用するには、まずAdjust Android SDKをダウンロードして設定してください。
ガイド
Mixpanel APIを活用して「super properties」を登録することができます。このプロパティは、全てのアクティビティと送信できます。詳細については、Mixpanelのドキュメントをご覧ください。
Adjust SDKをMixpanel SDKと連携するには、「super properties」を登録する必要があります。
Adjustサーバーからレスポンスを受け取った後に情報を送信してください。これを行うには、Android向けアトリビューションコールバックガイドの手順に従ってください:
例
Mixpanel APIを使用するには、コールバックメソッドを以下のように変更します:
public class YourApplicationClass extends Application { @Override public void onCreate() { super.onCreate(); // Configure Adjust. AdjustConfig config = new AdjustConfig(this, appToken, environment);
config.setOnAttributionChangedListener(new OnAttributionChangedListener() { @Override public void onAttributionChanged(AdjustAttribution attribution) { MixpanelAPI mixpanel = MixpanelAPI.getInstance(context, MIXPANEL_TOKEN);
// The Adjust properties will be sent with all future track calls. JSONObject props = new JSONObject(); insertJsonProperty(props, "[Adjust]Network", attribution.network); insertJsonProperty(props, "[Adjust]Campaign", attribution.campaign); insertJsonProperty(props, "[Adjust]Adgroup", attribution.adgroup); insertJsonProperty(props, "[Adjust]Creative", attribution.creative);
if (props.length() > 0) { mixpanel.registerSuperProperties(props); } }
private void insertJsonProperty(JSONObject props, String name, String value) { try { if (value != null) { props.put(name, value); } } catch(JSONException e) { } } });
Adjust.onCreate(config); }}