サポート問い合わせ先| システムステータス
ページコンテンツ

    ディメンション:viewer

    このトピックでは、 Analytics API viewer ディメンションについて説明します。viewer ディメンションは、視聴者による分析を提供します。

    はじめに

    viewer ディメンションを使用すると、視聴者ごとにアナリティクスを見ることができます。視聴者IDがプレーヤーから分析データ コレクターに送信されない場合、視聴者のIPアドレスとユーザーエージェントから視聴者IDを構築しようとしますが、この方法ではエラーが発生しやすくなります。視聴者アナリティクスは、ログインしている視聴者がいて、その視聴者を確実に特定できる場合に最も役立ちます。

    URL パラメータ

    Analytics API レポートでは、次の URL パラメータがサポートされています。

    URL パラメータ
    パラメーター 説明 必須 デフォルト
    account 報告したいアカウント はい 1 つ以上のアカウント ID をカンマで区切ったリスト なし
    dimensions レポートするディメンション はい カンマ区切りリストとしての 1 つ以上のディメンション (一部の組み合わせは無効です - ここで インタラクティブ ツールを使用して、組み合わせが有効かどうかを判断します。) なし
    where レポートのフィルタを指定するために使用 いいえ {dimension}=={value} - 1 つ以上のセミコロン区切りリスト。値は、そのディメンションの主なメトリックの 1 つ以上の値になります。例えば: account==account_id, country=country-code, または viewer=viewer_id (最後の場合、viewer_id の形式は何らかの viewer_id を自分で取得して送信するか、アナリティクス システムが生成する値によって異なります). なし
    limit 返すアイテムの数 いいえ 正の整数 10
    offset スキップする項目の数 いいえ 正の整数 0
    sort アイテムを並べ替えるフィールド いいえ リクエストによって返されるフィールド video_view
    fields 返すフィールド いいえ レポートするディメンションによって異なります。 video, video_view
    format 結果を返す形式 いいえ json (デフォルト) | csv | xlxs json
    reconciled 含まれている場合、結果は履歴データまたはリアルタイム データに制限されます。分析データは複数のソースから取得されます。プレーヤーから送信されるデータもありますが、CDN や Video Cloud システムから収集されるデータもあります。可能な限り迅速にアナリティクスを提供するため、「リアルタイム」データが利用可能になるとすぐに提供を開始し、すべてのソースからのデータが収集され処理された後でアナリティクスを調整します。完全に処理されたデータは調整済みと呼ばれます。 no true | false true
    from リクエストの日付範囲の開始日 いいえ 次のいずれか:
    • ISO 8601 date (YYYY-MM-DD)
    • ミリ秒単位のエポック時間 (例: 1659641316719 [= 2022年8月4日木曜日 7:28:36.719 PM GMT])。エポック時間コンバーターを参照して下さい。
    • 文字列: from=alltime
    • 日(d)、週(w)、月(m)単位の - +/- 相対日付 - 例: from=-6m&to=%2B2w (6ヶ月前から2週間後までの期間 -- + 記号は %2B としてURIエンコードする必要があることに注意)

    エンゲージメント エンドポイント、または reconciled=false の場合、過去 32 日以内の日付のみが許可されます。

    -30d
    to リクエストの日付範囲の終わり いいえ 次のいずれか:
    • ISO 8601 date (YYYY-MM-DD)
    • ミリ秒単位のエポック時間 (例: 1659641316719 [= 2022年8月4日木曜日 7:28:36.719 PM GMT])。エポック時間コンバーターを参照して下さい。
    • 文字列: to=now
    • 日(d)、週(w)、月(m)単位の - +/- 相対日付 - 例: from=-6m&to=%2B2w (6ヶ月前から2週間後までの期間 -- + 記号は %2B としてURIエンコードする必要があることに注意)

    エンゲージメント エンドポイント、または reconciled=false の場合、過去 32 日以内の日付のみが許可されます。

    now

    使用可能なフィールド

    ディメンションに対して以下のフィールドを返すことができます。

    • application - バーチャル イベント エクスペリエンス ID。渡されない場合はNULLになります。
    • engagement_score - エンゲージメント スコア
    • video_engagement_1 - 動画再生時間の 1% でのエンゲージメント
    • video_engagement_25 - 動画再生時間の 25% でのエンゲージメント
    • video_engagement_50 - 動画再生時間の 50% でのエンゲージメント
    • video_engagement_75 - 動画再生時間の 75% でのエンゲージメント
    • video_engagement_100 - 動画再生時間の 100% でのエンゲージメント
    • time - 最後に受信したイベントのエポックタイム
    • video_view - 視聴者の再生開始回数
    • viewer[1] - イベント視聴者 (SSO ID およびデバイス ID またはユーザーエージェントとIPに基づく一意の文字列)

    クエリに関連するディメンションが含まれている場合は、追加のフィールドも使用できます:

    • city - 視聴者がいた都市 (city ディメンションが必要)
    • country - 視聴者がいた国 (コード) (country ディメンションが必要)
    • country_name - 視聴者がいた国名 (country ディメンションが必要)
    • region - 視聴者がいた地域(コード)(region ディメンションが必要)
    • region_name - 視聴者がいた地域名 (region ディメンションが必要)
    • rebuffering_seconds - プレーヤーが再バッファリングに費やした合計時間 (country または region を含める必要があります)
    • device_type - 視聴者が使用していたデバイスの種類 (device_type ディメンションが必要)

    視聴者IDの送信

    視聴者 ID をアナリティクス システムに送信するには、実行時に視聴者を識別する一意の ID を構築するロジックを作成し、それをプレーヤから分析データ コレクターに送信する必要があります。ID を作成するロジックは、視聴者がコンテンツを見るためにどのように認証するかによって異なります。Brightcove の Web プレーヤー、iOS および Android SDK プレーヤーは、アナリティクスにユーザー ID を送信できます。次のセクションで、Web プレーヤーと SDK プレーヤーに対してこれを行う方法を示します。

    視聴者 ID の送信 - Brightcove プレーヤー

    要件

    視聴者 ID トラッキングには、次の要件が必要です:

    • Brightcove プレーヤー v7.18.0 以降

    まず、ユーザーの視聴アクティビティを保存するためにユーザー ID を設定する必要があります。

    Brightcoveプレーヤー

    Brightcove Player を使用している場合は、次の手順に従います。

    1. 視聴者データは Brightcove Analytics に自動的に送信されますが、ユーザー ID を設定する必要があります。これを行うには、user() メソッドを使用します。例:

      myPlayer.bcAnalytics.client.user('viewer id');

      Brightcove Player をホストする Web サイトでは、認証ゲートウェイまたは何らかの ID 管理ソリューションを使用して視聴者を追跡できます。このビューア ID を、Brightcove アナリティクスに渡すビューア ID として使用します。

    2. プレーヤーにソースが設定される前にビューア ID を設定することが重要です。プレーヤーを初期化した直後に呼び出す必要があります。

      <video-js
              id="myPlayerID"
              data-account="1752604059001"
              data-player="hyQW6GByl"
              data-embed="default"
              controls=""
              data-video-id="6156696074001"
              data-playlist-id=""
              data-application-id=""
              width="640" height="360"></video-js>
              <script src="https://players.brightcove.net/1752604059001/hyQW6GByl_default/index.min.js"></script>
              
              <script> videojs.getPlayer('myPlayerID').ready(function() {
              var myPlayer = this;
              
              // Brightcove アナリティクスのビューア ID を設定します
              myPlayer.bcAnalytics.client.user('viewer id');
              });
              </script>
    3. user() メソッドを使用すると、値はハッシュ化されず、後続のすべてのビーコンとともに平文で送信されます。

      この場合、player_init イベントには user フィールドは含まれませんが、すべての video_* イベントには含まれることに注意してください。

    カスタム プレーヤー

    Brightcove Player を使用しないカスタム実装を構築する場合は、Data Collection API リクエストに user パラメータを追加します。詳細については、概要: Data Collection API v2 ドキュメントを参照してください。

    認証ゲートウェイまたは ID 管理ソリューションを使用して、プレーヤーをホストするサイトで視聴者を追跡できます。この視聴者 ID を視聴者 ID として使用し、Brightcove アナリティクスに渡します。

    Brightcove Native SDK プレーヤーの場合、Brightcove が生成する ID に依存しない限り、視聴者 ID も送信する必要があります。

    Android

    Android プレーヤーには、次のコードを追加して下さい:

    HashMap<String, String> baseParams = new HashMap<>();
        baseParams.put(Analytics.Fields.USER, "viewer id");
        baseParams.put(Analytics.Fields.APPLICATION_ID, "application id");
        
        HashMap<String, Object> eventParams = new HashMap<>();
        eventParams.put(Analytics.Fields.BASE_PARAMS, baseParams);
        eventEmitter.emit(EventType.ADD_ANALYTICS_BASE_PARAMS, eventParams);
        

    iOS

    iOS または tvOSの場合は、以下のコードを追加します:

    @try
        {
          [BCOVGlobalConfiguration.sharedConfig setValue:@{
            @"privateUser": self.viewer id,
            @"privateApplication": @"application id"
          }
          forKey:@"privateSessionAnalytics"];
        }
        @catch (NSException *e)
        {
          NSLog(@"%@", e.description);
        }
      

    フィルター値

    ディメンションをフィルタとして使用すると、結果を絞り込むことができます。

    フィルタ値:viewer ids

    ディメンションの組み合わせ

    viewer ディメンションは、取得可能な追加フィールドを追加する他のいくつかと組み合わせることができます。詳細は下表のとおりです。(ディメンションを含めると、デフォルトで太文字の項目がレスポンスに含まれます。)

    サポートされているディメンションの組み合わせ
    ディメンションでは機能 追加フィールド
    video video
    video_engagement_1
    video_engagement_25
    video_engagement_50
    video_engagement_75
    video_engagement_100
    video_percent_viewed
    video_seconds_viewed
    video_view
    video.tags
    video.reference_id
    video.name
    video.description
    video.long_description
    video.duration
    country country
    country_name
    region region
    region_name
    city city
    dma
    device_type device_type

    リクエストの例

    ディメンション リクエストのサンプル

          https://analytics.api.brightcove.com/v1/data?accounts=3365624256001&dimensions=viewer&limit=10&fields=viewer,time,video_view,engagement_score
    レスポンスのサンプル
    {
        "item_count": 8,
        "items": [
          {
            "engagement_score": null,
            "viewer": "6798840584846290049",
            "time": 1623870475157,
            "video_view": 0
          },
          {
            "engagement_score": 100,
            "viewer": "-1094565064376617663",
            "time": 1623870472882,
            "video_view": 1
          },
          {
            "engagement_score": 100,
            "viewer": "8997125557862445199",
            "time": 1623870433989,
            "video_view": 1
          },
          {
            "engagement_score": 39.13,
            "viewer": "-8839675754655082792",
            "time": 1623872904633,
            "video_view": 1
          },
          {
            "engagement_score": 143.48,
            "viewer": "-6771654281667224776",
            "time": 1623869869930,
            "video_view": 2
          }
        ],
        "summary": {
          "engagement_score": 110.51,
          "time": 1623875119506,
          "video_view": 12
        }
      }

    マルチ ディメンション リクエストのサンプル

          https://analytics.api.brightcove.com/v1/data?accounts=3365624256001&dimensions=viewer,country,region,city,video,device_type&limit=10&fields=viewer,time,video_view,engagement_score,video_percent_viewed,video_seconds_viewed,video_engagement_1,video_engagement_25,video_engagement_50,video_engagement_75,video_engagement_100,video.tags,video.reference_id,video.name,video.description,video.duration,video.long_description,dma,country_name,region_name
    レスポンスのサンプル
    {
        "item_count": 8,
        "items": [
          {
            "country": "MX",
            "viewer": "6798840584846290049",
            "video.name": "Bison",
            "video_seconds_viewed": 23,
            "video_engagement_75": 1,
            "city": "Zapopan",
            "device_type": "desktop",
            "video": "5754204614001",
            "video_engagement_50": 1,
            "video.description": "Bison in Yellowstone National Park",
            "video.reference_id": null,
            "video_percent_viewed": 100,
            "country_name": "Mexico",
            "region_name": null,
            "video_engagement_25": 1,
            "video.long_description": "Bison in Yellowstone National Park. This is the long description.  This was filmed in Yellowstone National Park.",
            "video.duration": 23295,
            "video_engagement_100": 1,
            "engagement_score": null,
            "video_engagement_1": 1,
            "video.tags": [
              "animals",
              "simulive",
              "yellowstone"
            ],
            "dma": "0",
            "time": 1623870475157,
            "video_view": 0,
            "region": "MX-JAL"
          },
          {
            "country": "US",
            "viewer": "-8839675754655082792",
            "video.name": "Bison",
            "video_seconds_viewed": 9,
            "video_engagement_75": 0,
            "city": "Safety Harbor",
            "device_type": "desktop",
            "video": "5754204614001",
            "video_engagement_50": 0,
            "video.description": "Bison in Yellowstone National Park",
            "video.reference_id": null,
            "video_percent_viewed": 39.13,
            "country_name": "United States",
            "region_name": "Florida",
            "video_engagement_25": 1,
            "video.long_description": "Bison in Yellowstone National Park. This is the long description.  This was filmed in Yellowstone National Park.",
            "video.duration": 23295,
            "video_engagement_100": 0,
            "engagement_score": 39.13,
            "video_engagement_1": 1,
            "video.tags": [
              "animals",
              "simulive",
              "yellowstone"
            ],
            "dma": "539",
            "time": 1623872904633,
            "video_view": 1,
            "region": "US-FL"
          },
          {
            "country": "US",
            "viewer": "-1094565064376617663",
            "video.name": "Bison",
            "video_seconds_viewed": 23,
            "video_engagement_75": 1,
            "city": "Boulder",
            "device_type": "desktop",
            "video": "5754204614001",
            "video_engagement_50": 1,
            "video.description": "Bison in Yellowstone National Park",
            "video.reference_id": null,
            "video_percent_viewed": 100,
            "country_name": "United States",
            "region_name": "Colorado",
            "video_engagement_25": 1,
            "video.long_description": "Bison in Yellowstone National Park. This is the long description.  This was filmed in Yellowstone National Park.",
            "video.duration": 23295,
            "video_engagement_100": 1,
            "engagement_score": 100,
            "video_engagement_1": 1,
            "video.tags": [
              "animals",
              "simulive",
              "yellowstone"
            ],
            "dma": "751",
            "time": 1623870472882,
            "video_view": 1,
            "region": "US-CO"
          },
          {
            "country": "US",
            "viewer": "8997125557862445199",
            "video.name": "Bison",
            "video_seconds_viewed": 23,
            "video_engagement_75": 1,
            "city": "Boulder",
            "device_type": "desktop",
            "video": "5754204614001",
            "video_engagement_50": 1,
            "video.description": "Bison in Yellowstone National Park",
            "video.reference_id": null,
            "video_percent_viewed": 100,
            "country_name": "United States",
            "region_name": "Colorado",
            "video_engagement_25": 1,
            "video.long_description": "Bison in Yellowstone National Park. This is the long description.  This was filmed in Yellowstone National Park.",
            "video.duration": 23295,
            "video_engagement_100": 1,
            "engagement_score": 100,
            "video_engagement_1": 1,
            "video.tags": [
              "animals",
              "simulive",
              "yellowstone"
            ],
            "dma": "751",
            "time": 1623870433989,
            "video_view": 1,
            "region": "US-CO"
          },
          {
            "country": "US",
            "viewer": "-4530870087560842176",
            "video.name": "Bison",
            "video_seconds_viewed": 46,
            "video_engagement_75": 2,
            "city": "Newton Center",
            "device_type": "desktop",
            "video": "5754204614001",
            "video_engagement_50": 2,
            "video.description": "Bison in Yellowstone National Park",
            "video.reference_id": null,
            "video_percent_viewed": 200,
            "country_name": "United States",
            "region_name": "Massachusetts",
            "video_engagement_25": 2,
            "video.long_description": "Bison in Yellowstone National Park. This is the long description.  This was filmed in Yellowstone National Park.",
            "video.duration": 23295,
            "video_engagement_100": 2,
            "engagement_score": 100,
            "video_engagement_1": 2,
            "video.tags": [
              "animals",
              "simulive",
              "yellowstone"
            ],
            "dma": "506",
            "time": 1623875061754,
            "video_view": 2,
            "region": "US-MA"
          },
          {
            "country": "MX",
            "viewer": "-6771654281667224776",
            "video.name": "Bison",
            "video_seconds_viewed": 66,
            "video_engagement_75": 1,
            "city": "Zapopan",
            "device_type": "desktop",
            "video": "5754204614001",
            "video_engagement_50": 1,
            "video.description": "Bison in Yellowstone National Park",
            "video.reference_id": null,
            "video_percent_viewed": 286.96,
            "country_name": "Mexico",
            "region_name": null,
            "video_engagement_25": 1,
            "video.long_description": "Bison in Yellowstone National Park. This is the long description.  This was filmed in Yellowstone National Park.",
            "video.duration": 23295,
            "video_engagement_100": 1,
            "engagement_score": 143.48,
            "video_engagement_1": 1,
            "video.tags": [
              "animals",
              "simulive",
              "yellowstone"
            ],
            "dma": "0",
            "time": 1623869869930,
            "video_view": 2,
            "region": "MX-JAL"
          }
        ],
        "summary": {
          "video_seconds_viewed": 305,
          "video_engagement_75": 10,
          "video_engagement_25": 11,
          "video_engagement_50": 10,
          "video_engagement_100": 10,
          "engagement_score": 110.51,
          "video_engagement_1": 11,
          "video_percent_viewed": 1326.09,
          "country_name": null,
          "region_name": null,
          "time": 1623875119506,
          "video_view": 12,
          "account": "3365624256001"
        }
      }

    ページの最終更新日22 Sep 2021