どのようにお手伝いできますか?

Data Locker経由のコストETLレポートとコホートレポートの結合

  • 更新

概要:コストETLと、Data Locker経由のコホートレポート(通常版・詳細集計版)を結合し、可能な限り最新かつ正確で詳細なデータを使って、マーケティングキャンペーンの全体像を把握します。

コストETLレポートとコホートレポートの結合について

コストETLレポートと、Data Locker経由のコホートレポート(通常版・詳細集計版)には、それぞれ異なる特徴があります。例えば、コストETLレポートにはインプレッション、クリック、広告費のデータが含まれ、コホートレポートにはアトリビューション、アプリ内イベント、収益の詳細なデータが含まれます。

コストETLレポートと集計コホートレポートを受信してBIシステムに読み込んだ後、社内のBIシステム上で両者を結合することを推奨します。

レポートを結合すると、次のことが可能になります。

  • 可能な限り最新かつ正確で詳細なデータを使って、マーケティング成果の全体像を把握できます。
  • 社内のBIシステムとAppsFlyerのダッシュボードで、表示するデータを揃えられます。
  • 広告費用対効果(ROAS)やアクション単価(CPA)など、重要な指標を計算できます。

レポート結合用のクエリ

以下では、コストETLレポートを次のレポートと結合するためのクエリと、考慮すべき事項を説明します。

コストETLレポートと詳細集計コホートレポートを結合するクエリ

コストETLレポートとコホートレポートを結合するには、BIシステム開発者が以下の作業を行います。

  • 以下のクエリを参考に、社内のBIシステムに合わせて調整します。
  • 重要な確認事項:
    • クエリ内の以下の項目を調整してください。
      • 開始日と終了日を変更します。
      • レポート名を変更します。
      • 使用するコストETLスキーマに含まれるディメンションと指標を選択します。
    • レポートによって更新頻度が異なります。例えば、コストETLは1日最大4回、詳細集計コホートレポートは1日に複数回更新されます。
    • 詳細集計コホートレポートには、過去1,095日間にコンバージョンしたユーザーが含まれます。それ以前にコンバージョンしたユーザーは、集計対象に含まれません。
    • コストETLレポートでは、AppsFlyerにデータが保存されているタイムゾーンを使用します。詳細集計コホートレポートには、UTCでバージョン管理されるレポートと、指定したタイムゾーンでバージョン管理されるレポートがあります。推奨事項:コストETLレポートと、指定したタイムゾーンでバージョン管理されるコホートレポートを結合してください。

クエリ

select ag.app_id,
   ag.days_post_attribution,
   ag.conversion_date,
   ag.event_date,
   ag.event_name,
   ag.media_source,
   ag.campaign,
   ag.campaign_id,
   ag.adset,
   ag.adset_id,
   ag.ad,
   ag.ad_id,
   ag.channel,
   ag.site_id,
   ag.keywords,
   ag.geo,
   ag.agency,
   ag.selected_currency as revenue_currency,
   ag.timezone as cohort_timezone,
   cst.timezone as cost_timezone,
   cst.os,     
   cst.ad_account,
   cst.currency as cost_currency,
   cst.original_currency as cost_original_currency,
   cost,
   original_cost,
   impressions as impressions,
   clicks,
   reported_impressions,
   reported_clicks,
   reported_conversions,
   ctr,
   cvr,
   ecpm,
   cpi,
   ccvr,
   cvvr,
   reported_cvr,
   install_diff,
   click_diff,
   impression_diff,
   ecpc,
   video_25p_views,
   video_50p_views,
   video_75p_views,
   video_completions,
   campaign_objective,
   cost_model,
   af_cost_model,
   bid_strategy,
   af_bid_strategy,
   bid_amount,
   original_bid_amount,
   SUM(cast(ag.revenue_selected_currency as double)) as revenue_selected_currency,
   SUM(cast(ag.revenue_usd as double)) as revenue_usd,
   SUM(cast(ag.unique_users as int)) as unique_users,
   SUM(cast(ag.first_inapps as int)) as first_inapps,
   SUM(cast(ag.event_count as int)) as event_count,
   coalesce(SUM(cast(case when ag.event_name = 'af_conversion' and ag.conversion_type = 'install' then ag.event_count end as int)),0) as installs,
   coalesce(SUM(cast(case when ag.event_name = 'af_conversion' and ag.conversion_type = 're-engagement' then ag.event_count end as int)),0) as re_engagements,
   coalesce(SUM(cast(case when ag.event_name = 'af_conversion' and ag.conversion_type = 're-attribution' then ag.event_count end as int)),0) as re_attribution
FROM {YOUR_ADVANCED_AGG_REPORT} as ag
   LEFT JOIN {YOUR_COST_ETL_REPORT} as cst
       ON ag.event_name = 'af_conversion'
           and ag.conversion_date = cst.date
           and ag.app_id = cst.app_id
           and ag.media_source = cst.media_source
           and ag.campaign = cst.campaign
           and ag.campaign_id = cst.campaign_id
           and ag.adset = cst.adset
           and ag.adset_id = cst.adset_id
           and ag.ad = cst.ad
           and ag.ad_id = cst.ad_id
           and ag.channel = cst.channel
           and ag.site_id = cst.site_id
           and ag.keywords = cst.keywords
           and ag.geo = cst.geo
           and ag.agency = cst.agency
WHERE ag.conversion_date between {start date} and {end date}
   and cst.date between {start date} and {end date}
GROUP BY ALL;

コストETLレポートとコホートレポートを結合するクエリ

コストETLレポートとコホートレポートを結合するには、BIシステム開発者が以下の作業を行います。

  • 以下のクエリを参考に、社内のBIシステムに合わせて調整します。
  • 重要な確認事項:
    • クエリ内の以下の項目を調整してください。
      • 開始日と終了日を変更します。
      • レポート名を変更します。
      • 使用するコストETLスキーマに含まれるディメンションと指標を選択します。
    • レポートによって更新頻度が異なります。例えば、コストETLは1日最大4回、Data Locker経由のコホートレポートは1日1回更新されます。
    • コストETLレポートでは、AppsFlyerにデータが保存されているタイムゾーンを使用します。 Data Locker経由のコホートレポートでは、UTCを使用します。

クエリ

select dl.app_id,
   dl.days_post_attribution,
   dl.conversion_date,
   dl.event_date,
   dl.event_name,
   dl.media_source,
   dl.campaign,
   dl.campaign_id,
   dl.adset,
   dl.adset_id,
   dl.ad,
   dl.ad_id,
   dl.channel,
   dl.site_id,
   dl.keywords,
   dl.geo,
   dl.agency,
   dl.selected_currency as revenue_currency,
   cst.timezone as cost_timezone,
   cst.os,          
   cst.ad_account,
   cst.currency as cost_currency,
   cst.original_currency as cost_original_currency,
   cost,
   original_cost,
   impressions as impressions,
   clicks,
   reported_impressions,
   reported_clicks,
   reported_conversions,
   ctr,
   cvr,
   ecpm,
   cpi,
   ccvr,
   cvvr,
   reported_cvr,
   install_diff,
   click_diff,
   impression_diff,
   ecpc,
   video_25p_views,
   video_50p_views,
   video_75p_views,
   video_completions,
   campaign_objective,
   cost_model,
   af_cost_model,
   bid_strategy,
   af_bid_strategy,
   bid_amount,
   original_bid_amount,
   SUM(cast(dl.revenue_selected_currency as double)) as revenue_selected_currency,
   SUM(cast(dl.revenue_usd as double)) as revenue_usd,
   SUM(cast(dl.unique_users as int)) as unique_users,
   SUM(cast(dl.event_count as int)) as event_count,
   coalesce(SUM(cast(case when dl.event_name = 'af_conversion' and dl.conversion_type = 'install' then dl.event_count end as int)),0) as installs,
   coalesce(SUM(cast(case when dl.event_name = 'af_conversion' and dl.conversion_type = 're-engagement' then dl.event_count end as int)),0) as re_engagements,
   coalesce(SUM(cast(case when dl.event_name = 'af_conversion' and dl.conversion_type = 're-attribution' then dl.event_count end as int)),0) as re_attribution
FROM {YOUR_DATA_LOCKER_REPORT} as dl
   LEFT JOIN {YOUR_COST_ETL_REPORT} as cst
       ON dl.event_name = 'af_conversion'
           and dl.conversion_date = cst.date
           and dl.app_id = cst.app_id
           and dl.media_source = cst.media_source
           and dl.campaign = cst.campaign
           and dl.campaign_id = cst.campaign_id
           and dl.adset = cst.adset
           and dl.adset_id = cst.adset_id
           and dl.ad = cst.ad
           and dl.ad_id = cst.ad_id
           and dl.channel = cst.channel
           and dl.site_id = cst.site_id
           and dl.keywords = cst.keywords
           and dl.geo = cst.geo
           and dl.agency = cst.agency
WHERE dl.conversion_date between {start date} and {end date}
   and cst.date between {start date} and {end date}
GROUP BY ALL;