属性を使用した機能テストの実行

手順の概要

  1. 組織の​ オンデバイス決定を有効にする
  2. A/B テスト ​ アクティビティの作成
  3. AとBの定義
  4. オーディエンスの追加
  5. トラフィック配分の設定
  6. バリエーションへのトラフィック配分の設定
  7. レポートの設定
  8. KPIを追跡するための指標の追加
  9. 属性を使用して機能テストを実行するコードを実装します
  10. コンバージョンイベントを追跡するコードの実装
  11. 属性を使用して機能テストをアクティブ化し
NOTE
小売e コマース企業の場合。 顧客が商品カタログを閲覧して整理する際のコンバージョン率を高めたいものです。 特定のソートアルゴリズムとページネーション戦略は、他のソートアルゴリズムよりも優れた結果をもたらすという仮説があります。 この理論をテストするには、エンドユーザー向けに異なる並べ替えオプションを使用して、並べ替えウィジェットの再設計を含む機能テストを実行します。 この機能テストは、ユーザーエクスペリエンスに悪影響を与えたり、結果をゆがめたりすることがないように、ほぼゼロの遅延で実行されるようにします。

​1. 組織の​ オンデバイス決定を有効にする

オンデバイス判定を有効にすると、A/B アクティビティがほぼゼロの遅延で実行されます。 この機能を有効にするには、Adobe Targetで​管理 > 実装 > アカウントの詳細​に移動し、オンデバイス決定 トグルを有効にします。

alt画像

NOTE
オンデバイス決定 トグルを有効または無効にするには、管理者または承認者​ ユーザーの役割が必要です。

オンデバイス決定 トグルを有効にすると、Adobe Targetは、クライアントに対して​ ルールアーティファクト ​の生成を開始します。

​2. A/B テスト ​ アクティビティの作成

  1. Adobe Targetで、アクティビティ ページに移動し、アクティビティの作成 > A/B テスト​を選択します。

    alt画像

  2. A/B テスト アクティビティの作成 モーダルで、デフォルトの​Web オプションを選択したままにし(1)、エクスペリエンス コンポーザーとして​ Form ​を選択し(2)、Default Workspace​を​プロパティ制限なし (3)で選択し、次へ (4)をクリックします。

    alt画像

​3. AとBの定義

  1. アクティビティ作成の​ エクスペリエンス ​手順で、アクティビティの名前(1)を入力し、「エクスペリエンスを追加 (2)」ボタンをクリックして、2番目のエクスペリエンスであるエクスペリエンス Bを追加します。 属性を使用して機能テストを実行するアプリケーション内の場所(3)の名前を入力します。 次の例では、product-results-pageはエクスペリエンス Aに定義された場所です。 (これは、エクスペリエンス Bに定義された場所でもあります)。

    alt画像

    エクスペリエンス A​には、次の操作を行うためのビジネスロジックを示すJSONが含まれます。

    • test_sorting機能フラグを使用して並べ替えアルゴリズム機能を開始します
    • sorting_algorithm _**_attributeで定義されている推奨ソート アルゴリズムを実行します
    • pagination_limitで定義されたページネーション戦略で定義されたページごとに50個の製品を返します
  2. エクスペリエンス Aで、クリックしてコンテンツを​ デフォルトコンテンツ ​からJSONに変更します。次に示すように、JSON オファーの作成​を選択します(1)。

    alt画像

  3. ページ化制限50個の製品で、推奨される並べ替えアルゴリズムの開始に使用されるtest_sorting、sorting_algorithm、およびpagination_limitのフラグと属性を使用して、JSONを定義します。

    note
    NOTE
    Adobe TargetがユーザーにExperience Aを表示するようにバケット化すると、例で定義された属性を持つJSONが返されます。 コードでは、並べ替え機能をオンにする必要があるかどうかを確認するために、機能フラグ test_sortingの値を確認する必要があります。 その場合は、sorting_algorithm属性の推奨値を使用して、製品リストビューに推奨製品を表示します。 アプリケーションに表示する製品の制限は50です。これは、pagination_limit属性の値だからです。

    alt画像

    エクスペリエンス B​は、次の操作を行うためのビジネスロジックを示すJSONを定義します。

    • test_sorting機能フラグを使用してソートアルゴリズム機能を開始します
    • sorting_algorithm _**_attributeで定義されたbest_sellers並べ替えアルゴリズムを実行します
    • pagination_limitで定義されたページネーション戦略で定義されたページごとに50個の製品を返します
    note
    NOTE
    Adobe Targetがユーザーにバケットを割り当ててExperience Bを表示すると、例で定義された属性を持つJSONが返されます。 コードでは、並べ替え機能をオンにする必要があるかどうかを確認するために、機能フラグ test_sortingの値を確認する必要があります。 その場合は、sorting_algorithm属性のbest_sellers値を使用して、商品リストビューでベストセラー商品を表示します。 アプリケーションに表示する製品の制限は50です。これは、pagination_limit属性の値だからです。

    alt画像

​4. オーディエンスの追加

ターゲティング​の手順では、すべての訪問者 オーディエンスを維持します。 これにより、並べ替え機能の影響と、結果に最も影響を与えるアルゴリズムとアイテム数を把握できます。

alt画像

​5. トラフィック配分の設定

並べ替えアルゴリズムとページネーション戦略をテストする訪問者の割合を定義します。 つまり、このテストを実施したいユーザーの割合は? この例では、このテストをすべてのログイン ユーザーにデプロイするには、トラフィック配分を100%に保ちます。

alt画像

​6. バリエーションへのトラフィック配分の設定

推奨される商品とベストセラーの並べ替えアルゴリズムを比較する訪問者の割合を定義します。アルゴリズムは1 ページにつき50件までです。 この例では、エクスペリエンス AとBの間のトラフィック分布を50/50の割合で維持します。

alt画像

​7. レポートの設定

目標と設定 ステップで、レポートSource​として​ Adobe Target ​を選択してAdobe Target UIでA/B テストの結果を表示するか、Adobe Analytics​を選択してAdobe Analytics UIで結果を表示します。

alt画像

​8. KPIを追跡するための指標の追加

目標指標​を選択して、属性を使用して機能テストを測定します。 この例では、ユーザーが製品を購入するかどうかに基づいて、表示された並べ替えアルゴリズムとページネーション戦略に応じて成功します。

​9. 属性を使用した機能テストをアプリケーションに実装します

Node.js
code language-js line-numbers
const TargetClient = require("@adobe/target-nodejs-sdk");
const options = {
  client: "testClient",
  organizationId: "ABCDEF012345677890ABCDEF0@AdobeOrg",
  decisioningMethod: "on-device",
  events: {
    clientReady: targetClientReady
  }
};
const targetClient = TargetClient.create(options);

function targetClientReady() {
  return targetClient.getAttributes(["product-results-page"]).then(function(attributes) {
    const test_sorting = attributes.getValue("product-results-page", "test-sorting");
    const sorting_algorithm = attributes.getValue("product-results-page", "sorting_algorithm");
    const pagination_limit = attributes.getValue("product-results-page", "pagination_limit");
  });
}
Java
code language-java line-numbers
import com.adobe.target.edge.client.ClientConfig;
import com.adobe.target.edge.client.TargetClient;
import com.adobe.target.delivery.v1.model.ChannelType;
import com.adobe.target.delivery.v1.model.Context;
import com.adobe.target.delivery.v1.model.ExecuteRequest;
import com.adobe.target.delivery.v1.model.MboxRequest;
import com.adobe.target.edge.client.entities.TargetDeliveryRequest;
import com.adobe.target.edge.client.model.TargetDeliveryResponse;

ClientConfig config = ClientConfig.builder()
    .client("testClient")
    .organizationId("ABCDEF012345677890ABCDEF0@AdobeOrg")
    .build();
TargetClient targetClient = TargetClient.create(config);
MboxRequest mbox = new MboxRequest().name("product-results-page").index(0);
TargetDeliveryRequest request = TargetDeliveryRequest.builder()
    .context(new Context().channel(ChannelType.WEB))
    .execute(new ExecuteRequest().mboxes(Arrays.asList(mbox)))
    .build();
Attributes attributes = targetClient.getAttributes(request, "product-results-page");
String testSorting = attributes.getString("product-results-page", "test-sorting");
String sortingAlgorithm = attributes.getString("product-results-page", "sorting_algorithm");
String paginationLimit = attributes.getString("product-results-page", "pagination_limit");

​10. コンバージョンイベントを追跡するコードの実装

Node.js
code language-js line-numbers
//... Code removed for brevity

//When a conversion happens
TargetClient.sendNotifications({
    targetCookie,
    "request" : {
      "notifications" : [
        {
          type: "click",
          timestamp : Date.now(),
          id: "conversion",
          mbox : {
            name : "product-results-page"
          }
        }
      ]
    }
})
Java
code language-java line-numbers
ClientConfig config = ClientConfig.builder()
  .client("acmeclient")
  .organizationId("1234567890@AdobeOrg")
  .build();
TargetClient targetClient = TargetClient.create(config);

Context context = new Context().channel(ChannelType.WEB);

ExecuteRequest executeRequest = new ExecuteRequest();

NotificationDeliveryService notificationDeliveryService = new NotificationDeliveryService();

Notification notification = new Notification();
notification.setId("conversion");
notification.setImpressionId(UUID.randomUUID().toString());
notification.setType(MetricType.CLICK);
notification.setTimestamp(System.currentTimeMillis());
notification.setTokens(
    Collections.singletonList(
        "IbG2Jz2xmHaqX7Ml/YRxRGqipfsIHvVzTQxHolz2IpSCnQ9Y9OaLL2gsdrWQTvE54PwSz67rmXWmSnkXpSSS2Q=="));

TargetDeliveryRequest targetDeliveryRequest =
    TargetDeliveryRequest.builder()
        .context(context)
        .execute(executeRequest)
        .notifications(Collections.singletonList(notification))
        .build();

TargetDeliveryResponse offers = targetClient.getOffers(request);
notificationDeliveryService.sendNotification(request);

Attributes attributes = targetClient.getAttributes(request, "product-results-page");
String testSorting = attributes.getString("product-results-page", "test-sorting");
String sortingAlgorithm = attributes.getString("product-results-page", "sorting_algorithm");
String paginationLimit = attributes.getString("product-results-page", "pagination_limit");

​11. 属性を使用して機能テストをアクティブ化し

alt画像

recommendation-more-help
target-dev-help-dev