{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-@l10n/ja/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"Youtube Analytics Import Integration","description":"Treasure Data Product Documentation · Collect and Unify · Segment and Activate · Experiment and Analyze · Decisioning Automate with AI Scale and Trust.","siteUrl":"https://docs.treasuredata.com","lang":"en-US","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"youtube-analytics-import-integration","__idx":0},"children":["Youtube Analytics Import Integration"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Treasure DataのCustomer Data Platformを使用して、YouTube Analyticsデータを取り込みます。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"前提条件","__idx":1},"children":["前提条件"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["以下の基本的な知識が必要です"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Treasure コンソール（およびToolbelt）"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["YouTube Analytics"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"treasure-コンソールからの使用","__idx":2},"children":["Treasure コンソールからの使用"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Treasure コンソールからData Connectorを作成できます。これが最も一般的な方法です。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"新しい接続の作成","__idx":3},"children":["新しい接続の作成"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Treasure Data Catalogにアクセスし、YouTubeを検索して選択します。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/image-20191015-210643.11c3fa79ea522745be8cb122f34b678e1a9c59f2d4f0950a4c386fe2b3afce6e.8d444f57.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["次のダイアログが開きます。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/image-20191015-210712.d89b977f21ce934a67a97ec6c83b012a85c728746770be04c997e56d20d3a217.8d444f57.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["認証モードのいずれかを選択します："]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["OAuth"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Your custom OAuth app"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Your custom OAuth app"]},"が推奨されるモードです。詳細については、Q&Aセクションを参照してください。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Your custom OAuth app"]},"を選択した場合は、以下のパラメータを指定してください："]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["OAuth client_id: Google Consoleで設定したカスタムOAuthアプリのclient_id。詳細については、付録を参照してください。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["OAuth client_secret: Google Consoleで設定したカスタムOAuthアプリのclient_secret。詳細については、付録を参照してください。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["OAuth refresh_token: カスタムOAuthアプリのすべてのスコープを許可するアカウントのrefresh_token。詳細については、付録を参照してください。"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["OAuth"]},"を選択した場合は、既存のOAuth接続を選択するか、",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Click Here"]},"をクリックして新しいアカウントを接続します。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/image2022-6-28_13-53-27.7e1e290876437d05a880cf43279301f9e812df68aceaea4e0000e17b26345a30.8d444f57.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Continue"]},"をクリックします。コネクタの名前を入力します。",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Done"]},"をクリックします。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/image-20191009-223948.730ea2dd12b945e36edc4f73b986970572b126b7c5f696b45f1ccd0dac76d961.8d444f57.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"新しいsourceの作成","__idx":4},"children":["新しいSourceの作成"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["保存された認証情報から",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["New Source"]},"をクリックします"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/image-20191009-224009.c46e2d3af1aef40c9511ab0a9c8ff4bb28648ff705c2e0114b52531e6be13b3c.8d444f57.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://www.youtube.com/yt/creators/benefits/"},"children":["https://www.youtube.com/yt/creators/benefits/"]},"プログラムに参加している場合は、アカウントのCMS IDとChannel IDsを入力してください。そうでない場合は、パラメータを空白のままにしてください。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Report Type（Video、Playlist、またはChannel）を選択し、レポートプリセットを選択します。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/image-20191009-232214.86f22aec1dbbb85d2aa5578199dc877e755641e829465b1214a2269ea37693b9.8d444f57.png","alt":""},"children":[]},{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/image-20191009-232244.f0e4697356da91b883e8a575737a701551a3962310afdcda4a991be51eb4262c.8d444f57.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["パラメータ："]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["CMS ID: YouTube Partner Programに参加している場合のYouTubeアカウントのCMS ID。それ以外の場合は空白のままにしてください。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Channel IDs: Content Ownerの管理下にあるChannel IDsのリスト。パートナーではないYouTubeアカウントの場合は、空白のままにしてください。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Report Type: 分析の対象となる期待されるターゲット：video、playlist、またはchannels。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Report Presets: ディメンション、メトリクス、およびフィルタのコレクション。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Playlists: ビデオのリストをフィルタリングするためのplaylist IDs。このパラメータは、Videosレポートプリセットでのみ使用できます。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Dimensions: Analyticsディメンションのリスト"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Metrics: Analyticsメトリクスのリスト"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Filters: フィルタのリスト（このパラメータは一部のプリセットにのみ表示されます）"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Max Results: APIが返す分析レコードの数。このパラメータは特定のレポートでのみ必須です。それ以外の場合は、すべての分析を取得するために空白のままにしてください。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Sort: APIからの分析結果をソートするためのメトリクス。このパラメータは特定のレポートでのみ必須です。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Include Historical Channel Data: Content Ownerに参加する前のチャネルの履歴分析をYouTube Analytics APIが返すかどうかを指定します。このパラメータは、Content Owner以外のレポートでは必須ではありません。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Load from published date: 指定されたReport Typeの最も古い公開日が、分析を取得する開始日になります。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Begin date: 分析を取得する開始日（「Load from published date」または「Begin date」のいずれかを指定する必要があります）。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["End date: 分析を取得する終了日（この日を含む）。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Aggregation Period (Day): 分析の各レコードをグループ化する日数。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Duration (Day): 次の増分実行時に現在の終了日から分析を取得する日数。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Incremental: スケジュールで実行する場合、取得データの時間ウィンドウが実行ごとに自動的に前進します。たとえば、初期設定が1月1日で、1月15日まで取得し、期間が10日の場合、最初の実行では1月1日から1月15日までの変更データを取得し、2回目の実行では1月16日から1月25日まで取得します。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Ignore Empty Playlist: エラーをスローする代わりに空のプレイリストをスキップします"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"data-preview","__idx":5},"children":["Data Preview"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["インポートを実行する前に、Generate Preview を選択してデータの",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/customer-data-platform/integration-hub/batch/import/previewing-your-source-data"},"children":["プレビュー"]},"を表示できます。Data preview はオプションであり、選択した場合はダイアログの次のページに安全にスキップできます。"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Next"]}," を選択します。Data Preview ページが開きます。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["データをプレビューする場合は、",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Generate Preview"]}," を選択します。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["データを確認します。"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"data-placement","__idx":6},"children":["Data Placement"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["データの配置について、データを配置したいターゲット database と table を選択し、インポートを実行する頻度を指定します。"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Next"]}," を選択します。Storage の下で、インポートされたデータを配置する新しい database を作成するか、既存の database を選択し、新しい table を作成するか、既存の table を選択します。"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Database"]}," を選択 > ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Select an existing"]}," または ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Create New Database"]}," を選択します。"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["オプションで、database 名を入力します。"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Table"]}," を選択 > ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Select an existing"]}," または ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Create New Table"]}," を選択します。"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["オプションで、table 名を入力します。"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["データをインポートする方法を選択します。"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Append"]}," (デフォルト) - データインポートの結果は table に追加されます。"," ","table が存在しない場合は作成されます。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Always Replace"]}," - 既存の table の全体の内容をクエリの結果出力で置き換えます。table が存在しない場合は、新しい table が作成されます。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Replace on New Data"]}," - 新しいデータがある場合のみ、既存の table の全体の内容をクエリの結果出力で置き換えます。"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Timestamp-based Partition Key"]}," 列を選択します。"," ","デフォルトキーとは異なるパーティションキーシードを設定したい場合は、long または timestamp 列をパーティショニング時刻として指定できます。デフォルトの時刻列として、add_time フィルターで upload_time を使用します。"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["データストレージの ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Timezone"]}," を選択します。"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Schedule"]}," の下で、このクエリを実行するタイミングと頻度を選択できます。"]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"一度だけ実行","__idx":7},"children":["一度だけ実行"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Off"]}," を選択します。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Scheduling Timezone"]}," を選択します。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Create & Run Now"]}," を選択します。"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"定期的に繰り返す","__idx":8},"children":["定期的に繰り返す"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["On"]}," を選択します。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Schedule"]}," を選択します。UI では、",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["@hourly"]},"、",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["@daily"]},"、",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["@monthly"]},"、またはカスタム ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["cron"]}," の 4 つのオプションが提供されます。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Delay Transfer"]}," を選択して、実行時間の遅延を追加することもできます。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Scheduling Timezone"]}," を選択します。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Create & Run Now"]}," を選択します。"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["転送が実行された後、",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Data Workbench"]}," > ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Databases"]}," で転送の結果を確認できます。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"コマンドラインの使用","__idx":9},"children":["コマンドラインの使用"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["必要に応じて、Treasure コンソールではなくCLIからData Connectorを作成できます。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"前提条件のインストール","__idx":10},"children":["前提条件のインストール"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Ruby gemを使用して最新のtdツールをインストールします："]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"$ gem install td\n$ td --version\n0.16.1\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["他のインストール方法もあります。詳細については、",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://toolbelt.treasuredata.com/"},"children":["Treasure Data Toolbelt"]},"を参照してください。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"設定ファイルの作成configyml","__idx":11},"children":["設定ファイルの作成（config.yml）"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["例（config.yml）"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["以下は、YouTubeチャンネル上のすべてのビデオの日次基本統計をリクエストする設定ファイルの例です。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"yaml","header":{"controls":{"copy":{}}},"source":"in:\n  type: youtube\n  client_id: xxxxxxxxxxxxx\n  client_secret: xxxxxxxxxxxxx\n  access_token: xxxxxxxxxxxxx\n  refresh_token: xxxxxxxxxxxxx\n  report_type: video\n  video_report_preset: basic_statistics\n  skip_dimension: false\n  dimension_video_basic_statistics: country\n  metric_video_basic_statistics: views,comments,likes,dislikes\n  begin_date: 2018-01-01\n  end_date: 2018-02-01\n  duration: 30\n  interval: 1\n  ignore_empty_playlist: true\nout:\n  mode: append\n","lang":"yaml"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"認証","__idx":12},"children":["認証"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Google Appで認証するためのclient_id、client_secret、access_token、およびrefresh_tokenを指定します。詳細については、付録を参照してください。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"report-type","__idx":13},"children":["Report Type"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["report_typeパラメータで分析を取得するターゲットを指定します："]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["video: チャンネル内または特定のプレイリスト（playlistパラメータでカンマ区切りのPlaylist IDsリストとして指定）内の個々のビデオの分析を取得します。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["playlist: 個々のプレイリストの分析を取得します"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["channel: アカウントの管理下にある個々のチャンネルの分析を取得します。"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"プリセットまたは個別のディメンションとメトリクスの選択","__idx":14},"children":["プリセットまたは個別のディメンションとメトリクスの選択"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["プリセットは、事前定義されたパラメータのグループです。以下は、このパラメータで使用可能な列挙子と、それに相当するパラメータのグループです。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"videoおよびchannel-report_typeの場合","__idx":15},"children":["videoおよびchannel report_typeの場合："]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["basic_statistics"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"dimension: country\nmetric: views,comments,likes,dislikes,videosAddedToPlaylists,videosRemovedFromPlaylists,shares,estimatedMinutesWatched,averageViewDuration,averageViewPercentage,annotationClickThroughRate,annotationCloseRate,annotationImpressions,annotationClickableImpressions,annotationClosableImpressions,annotationClicks,annotationCloses,cardClickRate,cardTeaserClickRate,cardImpressions,cardTeaserImpressions,cardClicks,cardTeaserClicks,subscribersGained,subscribersLost\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["basic_statistics_co"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"dimension: country\nmetric: views,comments,likes,dislikes,videosAddedToPlaylists,videosRemovedFromPlaylists,shares,estimatedMinutesWatched,averageViewDuration,averageViewPercentage,annotationClickThroughRate,annotationCloseRate,annotationImpressions,annotationClickableImpressions,annotationClosableImpressions,annotationClicks,annotationCloses,cardClickRate,cardTeaserClickRate,cardImpressions,cardTeaserImpressions,cardClicks,cardTeaserClicks,subscribersGained,subscribersLost,estimatedRevenue,estimatedAdRevenue,grossRevenue,estimatedRedPartnerRevenue,monetizedPlaybacks,playbackBasedCpm,adImpressions,cpm\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["basic_statistics_us"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"dimension: province,subscribedStatus\nmetric: views,redViews,estimatedMinutesWatched,estimatedRedMinutesWatched,averageViewDuration,averageViewPercentage,annotationClickThroughRate,annotationCloseRate,annotationImpressions,annotationClickableImpressions,annotationClosableImpressions,annotationClicks,annotationCloses,cardClickRate,cardTeaserClickRate,cardImpressions,cardTeaserImpressions,cardClicks,cardTeaserClicks\nfilter: country==US\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["playback_detail"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"dimension: country,liveOrOnDemand,subscribedStatus,youtubeProduct\nmetric: views,estimatedMinutesWatched,averageViewDuration\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["playback_detail_us"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"dimension: province,liveOrOnDemand,subscribedStatus,youtubeProduct\nmetric: views,redViews,estimatedMinutesWatched,estimatedRedMinutesWatched,averageViewDuration\nfilter: country==US\n"},"children":[]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"dimension: province,liveOrOnDemand,subscribedStatus,youtubeProduct\nmetric: views,redViews,estimatedMinutesWatched,estimatedRedMinutesWatched,averageViewDuration\nfilter: country==US\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["playback_location"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"dimension: insightPlaybackLocationType,liveOrOnDemand,subscribedStatus\nmetric: views,estimatedMinutesWatched\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["playback_location_detail"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"dimension: insightPlaybackLocationDetail\nmetric: views,estimatedMinutesWatched\nfilter: insightPlaybackLocationType==EMBEDDED\nmax_results: 25\nsort: -views\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["playback_traffic_source"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"dimension: insightTrafficSourceType,liveOrOnDemand,subscribedStatus\nmetric: views,estimatedMinutesWatched\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["playback_traffic_source_detail"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"dimension: insightTrafficSourceDetail\nmetric: views,estimatedMinutesWatched\nfilter: insightTrafficSourceType==YT_SEARCH\nmax_results: 25\nsort: -views\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["device_os_type"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"dimension: deviceType,operatingSystem,liveOrOnDemand,subscribedStatus,youtubeProduct\nmetric: views,estimatedMinutesWatched\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["viewer_demographic"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"dimension: ageGroup,gender\nmetric: viewerPercentage\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["engagement_and_content_sharing"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"dimension: sharingService,subscribedStatus\nmetric: shares\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["audience_retention (動画のみ)"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"dimension: elapsedVideoTimeRatio\nmetric: audienceWatchRatio,relativeRetentionPerformance\nfilter: audienceType==ORGANIC\n"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"プレイリスト-report_type-の場合","__idx":16},"children":["プレイリスト ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["report_type"]}," の場合:"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["basic_statistics"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"dimension: country,subscribedStatus,youtubeProduct\nmetric: views,estimatedMinutesWatched,averageViewDuration,playlistStarts,viewsPerPlaylistStart,averageTimeInPlaylist\nfilter: isCurated==1\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["basic_statistics_us"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"dimension: province,subscribedStatus,youtubeProduct\nmetric: views,redViews,estimatedMinutesWatched,estimatedRedMinutesWatched,averageViewDuration,playlistStarts,viewsPerPlaylistStart,averageTimeInPlaylist\nfilter: isCurated==1;country==US\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["playback_location"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"dimension: insightPlaybackLocationType,subscribedStatus\nmetric: views,estimatedMinutesWatched,playlistStarts,viewsPerPlaylistStart,averageTimeInPlaylist\nfilter: isCurated==1\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["traffic_source"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"dimension: insightTrafficSourceType,subscribedStatus\nmetric: views,estimatedMinutesWatched,playlistStarts,viewsPerPlaylistStart,averageTimeInPlaylist\nfilter: isCurated==1\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["device_os_type"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"dimension: deviceType,operatingSystem,subscribedStatus,youtubeProduct\nmetric: views,estimatedMinutesWatched,playlistStarts,viewsPerPlaylistStart,averageTimeInPlaylist\nfilter: isCurated==1\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["viewer_demographic"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"dimension: ageGroup,gender\nmetric: viewerPercentage\nfilter: isCurated==1\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["dimension および metric パラメータ（および他の必須パラメータ）の値については、Google の以下の記事で確認できます:"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://developers.google.com/youtube/analytics/channel_reports"},"children":["https://developers.google.com/youtube/analytics/channel_reports"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://developers.google.com/youtube/analytics/content_owner_reports"},"children":["https://developers.google.com/youtube/analytics/content_owner_reports"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"その他のパラメータ","__idx":17},"children":["その他のパラメータ"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"値"},"children":["値"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"説明"},"children":["説明"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["content_owner"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["CMS ID (YouTube アカウントが Content Owner の場合は必須)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["channel"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["チャンネル ID のリスト。アカウントが Content Owner の場合のみ有効 (配列、オプション。空の場合、プラグインは Content Owner がアクセス権を持つチャンネルから分析データを取得します)。このパラメータは Content Owner レポートにのみ適用されます。"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["playlist"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["プレイリスト ID のリスト。",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["video"]}," レポートタイプの場合のみ有効 (配列、オプション。空白の場合、プラグインはすべての動画の分析データを取得します)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["metric"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["YouTube Analytics の指標（views、likes、dislikes など）のカンマ区切りリスト (文字列、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["report_preset"]}," が省略されている場合は必須)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["dimension"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["YouTube Analytics のディメンションのカンマ区切りリスト (文字列、オプション)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["filter"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["YouTube Analytics データを取得する際に適用するフィルタのリスト。セミコロンで区切ります (文字列、オプション)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["max_results"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["レスポンスに含める最大行数。一部のレポートでのみ必須 (整数、オプション)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["sort"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["YouTube Analytics データのソート順を決定するディメンションまたは指標のカンマ区切りリスト。デフォルトでは昇順です。",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["-"]}," プレフィックスを付けると降順になります (文字列、オプション)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["incremental"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["インクリメンタルローディング。たとえば、スケジュール実行時に、取得するデータの時間枠が各実行時に自動的に前方にシフトします (真偽値、オプション、デフォルト: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["true"]},")。たとえば、初期設定が1月1日で、期間が10日間の場合、最初の実行では1月1日から1月10日までに変更されたデータを取得し、2回目の実行では1月11日から1月20日まで、というように続きます。"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["load_from_published_date"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["指定したコンテンツ (レポートタイプ) の最も古い公開日が、分析データを取得する開始日になります (真偽値、オプション)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["begin_date"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["分析データを取得する開始日。サポートされる形式: \"yyyy-MM-dd\" (文字列、オプション)。次のいずれかを指定します:   - load_from_published_date - begin_date"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["end_date"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["分析データを取得する終了日。サポートされる形式: \"yyyy-MM-dd\" (文字列、必須)。"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["duration"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["次回のインクリメンタル実行で、現在の終了日から分析データを取得する日数 (整数、インクリメンタルモードでは必須)。"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["interval"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["分析データを分割する日数 (整数、オプション、デフォルト: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["1"]},"。たとえば、日次)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["include_historical_channel_data"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["チャンネルが Content Owner にリンクされる前の期間のチャンネルの視聴時間と視聴データを含めるかどうかを示します。デフォルトのパラメータ値は ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["false"]}," で、チャンネルが Content Owner にリンクされた日付からの視聴時間と視聴データのみをインポートすることを意味します (真偽値、オプション、デフォルト: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["false"]},")。",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["このパラメータは Content Owner レポートにのみ適用されます"]},"。"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["maximum_retries"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["諦めるまでのリトライ回数 (整数、オプション、デフォルト: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["7"]},")"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["retry_initial_wait_millis"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["リトライ間の初期待機時間 (ミリ秒) (整数、オプション、デフォルト: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["30000"]},"、つまり30秒)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["maximum_retry_wait_millis"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["リトライ間の最大待機時間 (ミリ秒) (整数、オプション、デフォルト: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["1800000"]},"、つまり30分)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["ignore_empty_playlist"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["エラーをスローする代わりに空のプレイリストを無視する"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"プレビュー","__idx":18},"children":["プレビュー"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"td connector:preview config.yml\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"ロードジョブの実行","__idx":19},"children":["ロードジョブの実行"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["データを格納するデータベースとテーブルを指定する必要があります。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Treasure Data はストレージを時間で分割するため、--time-column オプションを指定することをお勧めします。このオプションが利用できない場合、データコネクタは最初の long 型または timestamp 型の列をパーティション時間として選択します。--time-column で指定する列の型は、long 型または timestamp 型のいずれかである必要があります (利用可能な列名と型を確認するには、プレビュー結果を使用してください)。時間列は出力の最後に利用できます。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["データに時間列がない場合は、add_time フィルタオプションを使用して列を追加できます。詳細については、",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://docs.treasuredata.com/smart/project-product-documentation/add_time-filter-function"},"children":["add_time フィルタ関数"]}," を参照してください。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["ロードジョブを投入します。データサイズによっては、数時間かかる場合があります。データを格納するデータベースとテーブルを指定する必要があります。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"td connector:issue config.yml \\\n  --database sample_db \\\n  --table sample_table\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["td connector:issue は、すでにデータベース (sample_db) とテーブル (sample_table) を作成していることを前提としています。データベースまたはテーブルが TD に存在しない場合、td connector:issue は失敗します。したがって、データベースとテーブルを手動で作成するか、td connector:issue で --auto-create-table を使用してデータベースとテーブルを自動的に作成する必要があります:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"td connector:issue config.yml \\\n  --database sample_db \\\n  --table sample_table \\\n  --auto-create-table\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"スケジュール実行","__idx":20},"children":["スケジュール実行"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["定期的なYouTubeインポートのために、データコネクタの実行をスケジュール設定できます。この機能を使用することで、ローカルデータセンターにcronデーモンを設定する必要がなくなります。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"スケジュールの作成","__idx":21},"children":["スケジュールの作成"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["td connector:createで新しいスケジュールを作成します。スケジュール名、cron形式のスケジュール、データを保存するデータベースとテーブル、およびData Connector設定ファイルが必須です。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"td connector:create \\\ndaily_youtube_import \\\n\"10 0 * * *\" \\\nsample_db \\\nsample_table \\\nconfig.yml\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["cronパラメータは、@hourly、@daily、@monthlyの3つのオプションも受け付けます。詳細については、スケジュールジョブを参照してください。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["デフォルトでは、スケジュールはUTCタイムゾーンで設定されます。--timezoneまたは-tオプションを使用してタイムゾーンを設定できます。--timezoneオプションは、",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Asia/Tokyo"]},"、",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["America/Los_Angeles"]},"などの拡張タイムゾーン形式のみをサポートします。PST、CSTなどのタイムゾーンの略語はサポート",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["されておらず"]},"、予期しないスケジュールになる可能性があります。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"スケジュールの一覧表示","__idx":22},"children":["スケジュールの一覧表示"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["現在スケジュールされているエントリのリストは、td connector:listで確認できます。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"td connector:list\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"スケジュールの設定と履歴の表示","__idx":23},"children":["スケジュールの設定と履歴の表示"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["td connector:showは、スケジュールエントリの実行設定を表示します。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"td connector:show daily_youtube_import\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"制限事項","__idx":24},"children":["制限事項"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["YouTube Analyticsデータはパシフィック標準時(PST)に基づいており、最大72時間の遅延があります(",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://support.google.com/youtube/answer/1714329?hl=en"},"children":["https://support.google.com/youtube/answer/1714329?hl=en"]},")。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["削除された動画とプレイリストの分析データは取得できません。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"youtube-api-クォータとカスタムoauthアプリについて","__idx":25},"children":["YouTube API クォータとカスタムOAuthアプリについて"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["YouTubeには、YouTube Analytics API クォータに関して以下の制限があります:"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/image-20191009-234430.c31d62079ed2efb33c46112ce83210da5f56ff5dce3b15d118a72b930561b36a.8d444f57.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["コネクタは、日次のYouTube分析データを取り込むために多数のYouTube API呼び出しを行います。たとえば、チャンネルに1000本の動画があり、100日分の履歴データをインポートする場合、API呼び出しの合計数は1,000×100 = 100,000になります。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["コネクタは、YouTube APIをさらに実行する前に、実行されるリクエストの総数を見積もります。見積もりが100,000を超える場合、ジョブは停止します。集計期間を長くするか、終了日を早めるかのいずれかを行う必要があります。見積もりの計算方法は次のとおりです。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["4つの動画があるとします:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["動画1は2010-02-10に公開"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["動画2は2012-03-11に公開"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["動画3は2016-04-12に公開"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["動画4は2018-05-13に公開"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["次の例では、開始日はデータコネクタがYouTube Analyticsから分析データの取得を開始する日付です。公開日は動画がYouTubeで公開された日付です。終了日は、Treasure Dataで取り込みセッションを終了するように指定した日付です。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["終了日が2017-06-14で、開始日が2010-01-01の場合、集計期間は7です。1つの動画の総呼び出し数を計算する式は次のとおりです: 終了日 - 開始日 + 1 / 集計期間(開始日は公開日と同じ日付)。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["終了日は含まれます。つまり、その",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["end_date"]},"で利用可能な分析データも取り込まれます。4つの動画の場合:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["動画1: (\"2017-06-14\" - \"2010-02-10\") / 7 = 3040 / 7 = 435"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["動画2: (\"2017-06-14\" - \"2012-03-11\") / 7 = 2280 / 7 = 326"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["動画3: (\"2017-06-14\" - \"2016-04-12\") / 7 = 425 / 7 = 61"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["動画4は、終了日の後に公開されているためスキップされます。終了日は2017年で、動画4は2018年に公開されています"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["リクエストの総数の見積もりは: 435 + 326 + 61 = 822リクエストです。これは100,000リクエスト未満であるため問題ありません。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["複数の入力に同じ接続(新しい接続の作成を参照)を使用すると、クォータがすぐに使い果たされ、インポートジョブが停止します。回避策は、異なるOAuthアプリで複数の接続を作成することです(付録を参照)。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"qa","__idx":26},"children":["Q&A"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"コンテンツオーナーレポートプリセットの分析データを取得できないのはなぜですか","__idx":27},"children":["コンテンツオーナーレポートプリセットの分析データを取得できないのはなぜですか?"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["コンテンツオーナーレポートは、",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://www.youtube.com/yt/creators/benefits/"},"children":["https://www.youtube.com/yt/creators/benefits/"]},"プログラムに参加しているアカウントでのみ利用できます。このYouTubeプログラムに参加していない場合、コンテンツオーナー分析の取得は例外を引き起こします。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"最終日と今日のtd分析がyoutubeサイトとyoutube-analyticsダッシュボードに表示されるものと一致しないのはなぜですか","__idx":28},"children":["最終日と今日のTD分析がYouTubeサイトとYouTube Analyticsダッシュボードに表示されるものと一致しないのはなぜですか?"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["分析データが蓄積されるまで最大72時間かかることに注意してください。詳細については、",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://support.google.com/youtube/answer/1714329?hl=en"},"children":["https://support.google.com/youtube/answer/1714329?hl=en"]},"を参照してください。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"youtube-creator-studioダッシュボードに表示されるデータと取り込まれるデータの間に不一致があるのはなぜですか","__idx":29},"children":["YouTube Creator Studioダッシュボードに表示されるデータと取り込まれるデータの間に不一致があるのはなぜですか?"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["詳細なテスト中に、YouTube Creator Studioに表示される分析データと取り込まれるデータの間にいくつかの不一致があることがわかりました。調査した結果、いくつかの理由がわかりました:"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["表示する際、Creator Studioレポートは、Webサイトにデータを表示する前に一部の数値を四捨五入します。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["YouTube Analytics APIは、返される分析データに一部の制限を適用します。Creator Studioと一致させるには、特定のディメンションとフィルタを削除する必要がある場合があります。詳細については、",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://support.google.com/youtube/answer/9101241"},"children":["https://support.google.com/youtube/answer/9101241"]},"を参照してください"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"基本統計プリセットにredviewsメトリックが含まれていないのはなぜですか","__idx":30},"children":["基本統計プリセットにredViewsメトリックが含まれていないのはなぜですか?"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["テストフェーズ中に、リクエストにディメンションとメトリックの特定の組み合わせが含まれている場合、YouTube Analytics APIは通知や例外なしに空のレコードを返すことがわかりました。たとえば、国(country)とredViewsメトリックが同じリクエストにある場合、分析データは返されません。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["redViewsメトリックを取得するには、国(country)ディメンションを削除する必要があります。逆も同様です。そのため、このディメンションとメトリックのペアを持つレポートプリセットはありません。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"trueview経由でyoutube動画にアクセスしたユーザーの分析データを取り込むにはどうすればよいですか","__idx":31},"children":["TrueView経由でYouTube動画にアクセスしたユーザーの分析データを取り込むにはどうすればよいですか?"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["TrueViewからのビュー数を取得するには、プリセット: 再生トラフィックソース詳細を使用しますが、フィルタパラメータをinsightTrafficSourceType==YT_SEARCHからinsightTrafficSourceType==ADVERTISINGに変更します。取り込まれたinsightTrafficSourceDetail列には、「TrueView in-search and in-display」や「TrueView in-stream」などの値が保持されます。insightTrafficSourceTypeとinsightTrafficSourceDetailの可能な値のリストについては、",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://developers.google.com/youtube/analytics/dimensions#Traffic_Source_Dimensions"},"children":["https://developers.google.com/youtube/analytics/dimensions#Traffic_Source_Dimensions"]},"を参照してください。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["デフォルトのプリセット「再生トラフィックソース詳細」は、動画またはチャンネルにつながるトップ25の検索用語を取得します。YT_SEARCHからADVERTISINGに変更すると、insightTrafficSourceDetailの値のセットが異なります。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"1か月前にアップロードして1週間前に公開した動画が公開日からの分析データのみを表示するのはなぜですか","__idx":32},"children":["1か月前にアップロードして1週間前に公開した動画が、公開日からの分析データのみを表示するのはなぜですか?"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["動画の作成と動画のアップロードは同じです。ただし、動画の作成日と公開日には違いがあります。動画がYouTubeチャンネルにアップロードされた場合、それはまだプライベート動画であり、公開されるまで誰もその動画を視聴できません。作成時から公開時までインタラクションデータがないため、YouTube Analytics APIから返される分析データは公開時以降のもののみです。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"付録","__idx":33},"children":["付録"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"カスタムoauthアプリの作成方法","__idx":34},"children":["カスタムOAuthアプリの作成方法"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["以下の手順では、",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://console.developers.google.com/"},"children":["https://console.developers.google.com"]},"でカスタムOAuthアプリを設定する方法を示します。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"新しいgoogleプロジェクトの作成","__idx":35},"children":["新しいGoogleプロジェクトの作成"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Google Cloud Consoleで新しいプロジェクトを作成するには、",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://cloud.google.com/resource-manager/docs/creating-managing-projects"},"children":["https://cloud.google.com/resource-manager/docs/creating-managing-projects"]},"に従ってください。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"apiとサービスの有効化","__idx":36},"children":["APIとサービスの有効化"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://cloud.google.com/apis/docs/enable-disable-apis?hl=en"},"children":["https://cloud.google.com/apis/docs/enable-disable-apis?hl=en"]},"に従って、以下のAPIを有効にします:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["YouTube Analytics API"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["YouTube Data API v3"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"oauth-client-idの作成","__idx":37},"children":["OAuth Client IDの作成"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/image-20191009-234949.052c39a0041b79ffc2f855ef8698f23d22ce267ccebfb53c6fe9a2da2617f666.8d444f57.png","alt":""},"children":[]},{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/image-20191009-235017.d2c5c51e9fd6b5c2f62f6275879a7c4229a03dd68f6c52a2ba6c8f77d3f328b0.8d444f57.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["承認されたリダイレクトURIに",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://developers.google.com/oauthplayground"},"children":["https://developers.google.com/oauthplayground"]},"を追加すると、OAuth Playgroundを使用してrefresh_tokenを取得するのに役立ちます。他の方法がある場合は、OAuth Playgroundを追加する必要はありません。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"client-idとsecretの保存","__idx":38},"children":["client idとsecretの保存"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["次の手順で使用するために、client idとsecretをコピーしてどこかに保存します。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"refresh_tokenの取得方法","__idx":39},"children":["refresh_tokenの取得方法"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["以下の手順では、OAuth Playgroundを使用して、YouTubeデータ接続を作成するためのrefresh_tokenを取得する方法を示します。この情報を取得する他の方法がある場合は、OAuth Playgroundを使用する必要はありません。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"oauth-playgroundでclient-idとsecretを設定","__idx":40},"children":["OAuth PlaygroundでClient IdとSecretを設定"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://developers.google.com/oauthplayground/"},"children":["https://developers.google.com/oauthplayground/"]},"にアクセスします"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/image-20191009-235054.14d1f87328506d2660519c0d7d51b5764fcc21fb7ed2fefbcfd1f589980f78f7.8d444f57.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["付録で設定したIDとSecretを入力します。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"スコープの指定","__idx":41},"children":["スコープの指定"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Input your own scopes"]},"ボックスに次のスコープを貼り付けます:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"https://www.googleapis.com/auth/youtube.readonly https://www.googleapis.com/auth/yt-analytics-monetary.readonly https://www.googleapis.com/auth/yt-analytics.readonly https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/image-20191009-235229.3eef978fd8776d19a860d7129d845330ae69167bf55c1bfe306a4db3eef0046d.8d444f57.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"スコープの許可","__idx":42},"children":["スコープの許可"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Authorize APIs"]},"をクリックし、通常のGoogleの手順に従ってログインし、スコープを許可します。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"refresh_tokenのリクエスト","__idx":43},"children":["refresh_tokenのリクエスト"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Exchange authorization code for tokens"]},"をクリックします。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/image-20191009-235301.09f352ecbf25947c80506f04cfe81875c38b3b42da75610ec4a883c5cd6ed31a.8d444f57.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["プロセスが完了するまで待ってから、",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Refresh token"]},"をコピーして、Treasure Data YouTubeコネクタ設定で使用します。"]}]},"headings":[{"value":"Youtube Analytics Import Integration","id":"youtube-analytics-import-integration","depth":1},{"value":"前提条件","id":"前提条件","depth":2},{"value":"Treasure コンソールからの使用","id":"treasure-コンソールからの使用","depth":2},{"value":"新しい接続の作成","id":"新しい接続の作成","depth":3},{"value":"新しいSourceの作成","id":"新しいsourceの作成","depth":3},{"value":"Data Preview","id":"data-preview","depth":3},{"value":"Data Placement","id":"data-placement","depth":3},{"value":"一度だけ実行","id":"一度だけ実行","depth":4},{"value":"定期的に繰り返す","id":"定期的に繰り返す","depth":4},{"value":"コマンドラインの使用","id":"コマンドラインの使用","depth":2},{"value":"前提条件のインストール","id":"前提条件のインストール","depth":3},{"value":"設定ファイルの作成（config.yml）","id":"設定ファイルの作成configyml","depth":3},{"value":"認証","id":"認証","depth":3},{"value":"Report Type","id":"report-type","depth":3},{"value":"プリセットまたは個別のディメンションとメトリクスの選択","id":"プリセットまたは個別のディメンションとメトリクスの選択","depth":3},{"value":"videoおよびchannel report_typeの場合：","id":"videoおよびchannel-report_typeの場合","depth":4},{"value":"プレイリスト report_type の場合:","id":"プレイリスト-report_type-の場合","depth":4},{"value":"その他のパラメータ","id":"その他のパラメータ","depth":3},{"value":"プレビュー","id":"プレビュー","depth":3},{"value":"ロードジョブの実行","id":"ロードジョブの実行","depth":3},{"value":"スケジュール実行","id":"スケジュール実行","depth":3},{"value":"スケジュールの作成","id":"スケジュールの作成","depth":3},{"value":"スケジュールの一覧表示","id":"スケジュールの一覧表示","depth":3},{"value":"スケジュールの設定と履歴の表示","id":"スケジュールの設定と履歴の表示","depth":3},{"value":"制限事項","id":"制限事項","depth":3},{"value":"YouTube API クォータとカスタムOAuthアプリについて","id":"youtube-api-クォータとカスタムoauthアプリについて","depth":2},{"value":"Q&A","id":"qa","depth":2},{"value":"コンテンツオーナーレポートプリセットの分析データを取得できないのはなぜですか?","id":"コンテンツオーナーレポートプリセットの分析データを取得できないのはなぜですか","depth":3},{"value":"最終日と今日のTD分析がYouTubeサイトとYouTube Analyticsダッシュボードに表示されるものと一致しないのはなぜですか?","id":"最終日と今日のtd分析がyoutubeサイトとyoutube-analyticsダッシュボードに表示されるものと一致しないのはなぜですか","depth":3},{"value":"YouTube Creator Studioダッシュボードに表示されるデータと取り込まれるデータの間に不一致があるのはなぜですか?","id":"youtube-creator-studioダッシュボードに表示されるデータと取り込まれるデータの間に不一致があるのはなぜですか","depth":3},{"value":"基本統計プリセットにredViewsメトリックが含まれていないのはなぜですか?","id":"基本統計プリセットにredviewsメトリックが含まれていないのはなぜですか","depth":3},{"value":"TrueView経由でYouTube動画にアクセスしたユーザーの分析データを取り込むにはどうすればよいですか?","id":"trueview経由でyoutube動画にアクセスしたユーザーの分析データを取り込むにはどうすればよいですか","depth":3},{"value":"1か月前にアップロードして1週間前に公開した動画が、公開日からの分析データのみを表示するのはなぜですか?","id":"1か月前にアップロードして1週間前に公開した動画が公開日からの分析データのみを表示するのはなぜですか","depth":3},{"value":"付録","id":"付録","depth":2},{"value":"カスタムOAuthアプリの作成方法","id":"カスタムoauthアプリの作成方法","depth":3},{"value":"新しいGoogleプロジェクトの作成","id":"新しいgoogleプロジェクトの作成","depth":3},{"value":"APIとサービスの有効化","id":"apiとサービスの有効化","depth":3},{"value":"OAuth Client IDの作成","id":"oauth-client-idの作成","depth":3},{"value":"client idとsecretの保存","id":"client-idとsecretの保存","depth":3},{"value":"refresh_tokenの取得方法","id":"refresh_tokenの取得方法","depth":2},{"value":"OAuth PlaygroundでClient IdとSecretを設定","id":"oauth-playgroundでclient-idとsecretを設定","depth":3},{"value":"スコープの指定","id":"スコープの指定","depth":3},{"value":"スコープの許可","id":"スコープの許可","depth":3},{"value":"refresh_tokenのリクエスト","id":"refresh_tokenのリクエスト","depth":3}],"frontmatter":{"seo":{"title":"Youtube Analytics Import Integration"}},"lastModified":"2026-06-01T09:34:27.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/ja/int/youtube-analytics-import-integration","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}