アプリ内イベントのトラッキング
キャンペーンパフォーマンスを分析し、ユーザーのログイン、登録、チュートリアルの完了、または進行のマイルストーンなどの主要業績評価指標(KPI)を測定するために、アプリ内イベントを追跡します。
標準イベントと属性
標準イベントの使用
Singularは、レポートや最適化のために広告ネットワークが認識する標準イベントをサポートしています。自動認識とセットアップの簡素化のために、可能な限り標準イベント名を使用してください。
UA、マーケティング、またはビジネスチームは、組織のマーケティングKPIに基づいてイベントのリストを編集する必要があります。アプリ内イベントをトラッキングする方法」を参照してください:ガイド(How to Track In-App Events:Guide For Singular Attribution Customers)を参照してください。
各イベントはさまざまな属性をサポートします。実装の詳細については、イベントごとの推奨標準属性を参照してください。
イベントの送信
イベント実装ガイドライン
eventJSON またはevent メソッドを使って Singular にイベントを送信します(可読性を高めるためにeventJSON を推奨します)。
-
標準イベント:標準イベントリストにあるイベントのAndroid名(例:
sngTutorialComplete)を使用します。 - カスタムイベント:標準イベントと一致しないアプリ固有のイベントには、文字制限に準拠した任意の説明文字列を使用します。
カスタムイベントの制限
- 言語:サードパーティのパートナーや分析ソリューションとの互換性を確保するために、イベント名と属性を英語で渡します。
- イベント名:非ASCII文字列は、UTF-8に変換したときに32バイト未満でなければなりません。
- 属性と値:500ASCII文字に制限
eventJSONメソッド
構造化データの JSONObject フォーマットを使用して、追加情報を含むユーザー・イベントを報告します。
メソッドのシグネチャ:
Singular.eventJSON(String name, JSONObject args)
注: args パラメータは、1 つ以上のキーと値のペアを含む JSONObject です。キーは文字列でなければならず、値は JSONObject 値として許可される任意の型である。
使用例
// Example 1: Standard event with recommended attributes
val att = JSONObject().apply {
put(Attributes.sngAttrContent.toString(), "Telugu")
put(Attributes.sngAttrContentId.toString(), 32)
put(Attributes.sngAttrContentType.toString(), "video")
put(Attributes.sngAttrSuccess.toString(), 75)
}
Singular.eventJSON(Events.sngTutorialComplete.toString(), att)
// Example 2: Custom event with custom attributes
val att = JSONObject().apply {
put("Points", 500)
put("score", 650)
}
Singular.eventJSON("Bonus Points Earned", att)
// Example 1: Standard event with recommended attributes
JSONObject att = new JSONObject();
try {
att.put(Attributes.sngAttrContent.toString(), "Telugu");
att.put(Attributes.sngAttrContentId.toString(), 32);
att.put(Attributes.sngAttrContentType.toString(), "video");
att.put(Attributes.sngAttrSuccess.toString(), 92);
} catch (JSONException e) {
e.printStackTrace();
}
Singular.eventJSON(Events.sngTutorialComplete.toString(), att);
// Example 2: Custom event with custom attributes
JSONObject att = new JSONObject();
try {
att.put("Points", 500);
att.put("score", 650);
} catch (JSONException e) {
e.printStackTrace();
}
Singular.eventJSON("Bonus Points Earned", att);
イベント・メソッド
変数引数を使用して、追加情報の有無にかかわらずユーザー・イベントを報告する。
メソッドの署名:
Singular.event(String eventName)
Singular.event(String eventName, Object... args)
注: args パラメータは、1 つ以上のキーと値のペアを受け入れます。キーは文字列でなければならず、値はJSONObject値として許容される任意の型(JSONObject、JSONArray、String、Boolean、Integer、Long、Double、NULL)である。args リストには、偶数個の要素が含まれていなければなりません。
使用例
// Example 1: Standard event without attributes
Singular.event(Events.sngSubscribe.toString())
// Example 2: Standard event with recommended attributes
Singular.event(Events.sngTutorialComplete.toString(),
Attributes.sngAttrContent.toString(), "Telugu",
Attributes.sngAttrContentId.toString(), "32",
Attributes.sngAttrContentType.toString(), "video",
Attributes.sngAttrSuccess.toString(), "yes"
)
// Example 3: Custom event without attributes
Singular.event("SignUp")
// Example 4: Custom event with custom attribute
Singular.event("Bonus Points Earned", "Points", 500)
// Example 1: Standard event without attributes
Singular.event(Events.sngSubscribe.toString());
// Example 2: Standard event with recommended attributes
Singular.event(Events.sngTutorialComplete.toString(),
Attributes.sngAttrContent.toString(), "Spanish",
Attributes.sngAttrContentId.toString(), 52,
Attributes.sngAttrContentType.toString(), "video",
Attributes.sngAttrSuccess.toString(), 46
);
// Example 3: Custom event without attributes
Singular.event("SignUp");
// Example 4: Custom event with custom attribute
Singular.event("Bonus Points Earned", "Points", 500);
アプリ内収益のトラッキング
アプリ内課金(IAP)、サブスクリプション、およびカスタム収益ソースからの収益を追跡して、キャンペーンのパフォーマンスと広告費収益率(ROAS)を測定します。
収益データは3つのチャネルを通じて流れます:
- インタラクティブレポート:Singularダッシュボードで収益指標を表示
- ログのエクスポート:カスタム分析のための詳細なETLデータへのアクセス
- リアルタイムポストバック:収益イベントを外部プラットフォームへ送信
収益イベントの制限
- イベント名:カスタム収益イベント名は32 ASCII文字(またはUTF-8に変換された非ASCIIの場合は32バイト)に制限されます。
- 属性:イベント属性名と値は500 ASCII文字に制限されます。
- 通貨コード:すべて大文字で、3文字のISO 4217標準(例:USD、EUR、INR)に従わなければならない。
ベストプラクティス
- 標準的なネーミング:Singularの標準的なイベントと属性の命名規則を使用してください。
- 言語:広告ネットワークのポストバックとの互換性を高めるため、カスタム収益イベント名を英語で送信する。
- ゼロ以外の金額:金額が0以上の場合のみ、収益イベントを送信します。
サブスクリプション以外のアプリ内課金
購入オブジェクトの統合
Google Billing Libraryからrevenue またはcustomRevenue メソッドにPurchaseオブジェクトを渡し、充実したレポートとトランザクションの検証を行います。
メリット
- 豊富なデータ:包括的なレポートのためにトランザクションの詳細をすべて受け取ります。
- 不正防止:トランザクションの領収書により、アプリ内の不正行為に対抗するための検証が可能になります。
注意事項
-
カスタムイベント名:
customRevenueメソッドは、レポートでイベントタイプ別に収益を分類するためのカスタムイベント名を受け付けます。 - 通貨変換:異なる通貨での収益は、組織の優先通貨に自動的に変換されます。
Purchaseを使用した収益メソッド
収益イベントをPurchaseオブジェクトと一緒に送信し、自動検証と充実したデータを実現します。
メソッドの署名
Singular.revenue(String currency, double amount, Object purchase)
使用例
Singular.revenue("USD", 5.50, purchase)
Singular.revenue("USD", 5.50, purchase);
customRevenue Purchaseを使用したメソッド
分類された収益追跡のために、カスタム名とPurchaseオブジェクトを持つ収益イベントを送信します。
メソッドのシグネチャ:
Singular.customRevenue(String eventName, String currency, double amount, Object purchase)
使用例
Singular.customRevenue("MyCustomRevenue", "USD", 5.50, purchase)
Singular.customRevenue("MyCustomRevenue", "USD", 5.50, purchase);
サブスクリプション収益
サブスクリプションイベントの実装
サブスクリプションの購入と更新を追跡して、ユーザーの行動と定期的な収益生成に関する洞察を得ます。
実装ガイド:Singular SDKでサブスクリプションを追跡する詳細な手順については、包括的なサブスクリプションイベント技術実装ガイドをご覧ください。
購入検証なしのカスタム収益
手動での収益トラッキング
通貨、金額、オプションの商品詳細をPurchaseオブジェクトなしで渡すことで収益をトラッキングします。このメソッドは検証用のトランザクションレシートを提供しないことに注意してください。
重要:これらのメソッドを使用すると、Singularはトランザクションを検証できません。可能な限り、上記のPurchaseオブジェクトメソッドを使用することを強くお勧めします。
Purchase を使用しない収益メソッド
通貨、金額、オプションの商品詳細を含む収益イベントを送信します。
メソッドの署名:
Singular.revenue(String currency, double amount)
Singular.revenue(String currency, double amount, String productSKU, String productName, String productCategory, int productQuantity, double productPrice)
Singular.revenue(String currency, double amount, Map<String, Object> attributes)
使用例
// Without product details
Singular.revenue("USD", 5.50)
// With product details
Singular.revenue("EUR", 5.00, "SKU1928375", "Reservation Fee", "Fee", 1, 5.00)
// With product details in an attribute map
val attributes = mutableMapOf<String, Any>().apply {
put("product_id", "com.app.premium")
put("transaction_id", "T12345")
put("quantity", 1)
put("is_trial", false)
}
Singular.revenue("USD", 9.99, attributes)
// Without product details
Singular.revenue("USD", 5.50);
// With product details
Singular.revenue("EUR", 5.00, "SKU1928375", "Reservation Fee", "Fee", 1, 5.00);
// With product details in an attribute map
Map<String, Object> attributes = new HashMap<>();
attributes.put("product_id", "com.app.premium");
attributes.put("transaction_id", "T12345");
attributes.put("quantity", 1);
attributes.put("is_trial", false);
Singular.revenue("USD", 9.99, attributes);
customRevenue メソッド(購入なし
指定したイベント名、通貨、金額、およびオプションのトランザクション属性を持つカスタム収益イベントを送信します。
メソッドのシグネチャ:
Singular.customRevenue(String eventName, String currency, double amount)
Singular.customRevenue(String eventName, String currency, double amount, String productSKU, String productName, String productCategory, int productQuantity, double productPrice)
Singular.customRevenue(String eventName, String currency, double amount, Map<String, Object> attributes)
使用例
// Without product details
Singular.customRevenue("MyCustomRevenue", "USD", 5.50)
// With product details
Singular.customRevenue("MyCustomRevenue", "EUR", 5.00, "SKU1928375", "Reservation Fee", "Fee", 1, 5.00)
// With product details in an attribute map
val attributes = mutableMapOf<String, Any>().apply {
put("product_id", "com.app.premium")
put("transaction_id", "T12345")
put("quantity", 1)
put("is_trial", false)
}
Singular.customRevenue("MyCustomRevenue", "USD", 9.99, attributes)
// Without product details
Singular.customRevenue("MyCustomRevenue", "USD", 5.50);
// With product details
Singular.customRevenue("MyCustomRevenue", "EUR", 5.00, "SKU1928375", "Reservation Fee", "Fee", 1, 5.00);
// With product details in an attribute map
Map<String, Object> attributes = new HashMap<>();
attributes.put("product_id", "com.app.premium");
attributes.put("transaction_id", "T12345");
attributes.put("quantity", 1);
attributes.put("is_trial", false);
Singular.customRevenue("MyCustomRevenue", "USD", 9.99, attributes);
ハイブリッドイベント追跡(上級者向け)
最適なアトリビューションのために、アプリに統合されたSingular SDKを通してすべてのイベントと収益を送信します。ただし、Singularは必要に応じて他のソースからイベントを収集することができます。
Singular SDK以外で送信されたイベントは、SingularのServer-to-Server Event documentationに準拠し、正しいアトリビューションのために一致するデバイス識別子を提供する必要があります。
重要です:
サーバー間リクエストのデバイス識別子がSingular SDKによって記録された識別子に一致しない場合、不一致が発生します:
- 初期イベント:Singular SDK がデバイス識別子を記録する前にイベントが到着した場合、そのイベントは未知のデバイスの「最初のセッション」となり、その結果アトリビューションが不正になります。
- 識別子の不一致:Singular SDKがサーバー間リクエストのデバイス識別子と異なるデバイス識別子を記録した場合、イベントは正しく帰属されません。
ハイブリッドイベントトラッキングガイド
内部サーバーからのイベント送信
内部サーバーから収益データを収集し、キャンペーンのパフォーマンスとROIを分析します。
要件
- デバイス識別子を取得する:アプリ内登録またはログインイベント中に、デバイス識別子を取得して渡し、このデータをユーザーIDとともにサーバーに保存します。ユーザーが新しいアプリセッションを生成したときに識別子を更新し、正しいアトリビューションを確保します。
- プラットフォーム固有の識別子:プラットフォーム(iOSデバイスのIDFAまたはIDFVなど)に一致するデバイス識別子を使用して、サーバーサイドのイベントを送信します。
- リアルタイム更新:Singularの内部BIポストバックメカニズムを使用して、エンドポイントにリアルタイムでイベントをプッシュします。内部BIポストバックのFAQを参照してください。
- 実装の詳細:サーバー間統合ガイドの「収益の追跡」セクションを参照してください。
収益プロバイダからのイベントの送信
RevenueCatやadaptyのようなサードパーティの収益プロバイダーを統合して、購入や購読の収益をSingularに送信します。
サポートしているプロバイダー
- RevenueCat:詳細はRevenueCatのドキュメントをご覧ください。
- adapty詳細はadaptyのドキュメントをご覧ください。
セグメントからのイベント送信
Segmentに "Cloud-Mode "送信先を追加することで、Singular SDKと並行してSegmentからSingularへイベントを送信できるようになります。
詳細な設定方法については、実装ガイドSingular-Segment Integrationに従ってください。