BigQuery,如何复制 'Conversions | (Enhanced) Ecommerce | checkout behavior' 渠道报告
BigQuery, How to replicate the 'Conversions | (Enhanced) Ecommerce | checkout behavior' funnel report
我构建了一个查询,允许我在 bigquery 中复制 google 分析购物行为漏斗报告:
#standardSQL
select
case when totals.newvisits = 1 then 'New visitor' else 'Returning visitor' end as user_type,
count(distinct concat(fullvisitorid, cast(visitstarttime as string))) as all_sessions,
count(distinct case when hits.ecommerceaction.action_type = '2' then concat(fullvisitorid, cast(visitstarttime as string)) else null end) as sessions_with_product_views,
count(distinct case when hits.ecommerceaction.action_type = '3' then concat(fullvisitorid, cast(visitstarttime as string)) else null end) as sessions_with_add_to_card,
count(distinct case when hits.ecommerceaction.action_type = '5' then concat(fullvisitorid, cast(visitstarttime as string)) else null end) as sessions_with_check_out,
count(distinct case when hits.ecommerceaction.action_type = '6' then concat(fullvisitorid, cast(visitstarttime as string)) else null end) as sessions_with_transactions
from
`dataset.ga.ga_sessions_20210410`,
unnest(hits) as hits,
unnest(product) as product
where
totals.visits = 1
group by
user_type
order by
all_sessions desc
这里是结果:
这是针对会话的,我有一个类似的针对放弃的。
我找不到任何提供结帐阶段的字段,因此我也可以复制结帐报告渠道。这些阶段是 'current order'、'shipping billing method'、'order confirmation' 和相对下降。
提供购物阶段的字段是 'hits.ecommerceaction.action_type',是否有用于结帐的字段?
您可以使用 hits.eCommerceAction.step 获取结帐流程的步骤。
当通过命中指定结帐步骤时,将填充此字段。
我构建了一个查询,允许我在 bigquery 中复制 google 分析购物行为漏斗报告:
#standardSQL
select
case when totals.newvisits = 1 then 'New visitor' else 'Returning visitor' end as user_type,
count(distinct concat(fullvisitorid, cast(visitstarttime as string))) as all_sessions,
count(distinct case when hits.ecommerceaction.action_type = '2' then concat(fullvisitorid, cast(visitstarttime as string)) else null end) as sessions_with_product_views,
count(distinct case when hits.ecommerceaction.action_type = '3' then concat(fullvisitorid, cast(visitstarttime as string)) else null end) as sessions_with_add_to_card,
count(distinct case when hits.ecommerceaction.action_type = '5' then concat(fullvisitorid, cast(visitstarttime as string)) else null end) as sessions_with_check_out,
count(distinct case when hits.ecommerceaction.action_type = '6' then concat(fullvisitorid, cast(visitstarttime as string)) else null end) as sessions_with_transactions
from
`dataset.ga.ga_sessions_20210410`,
unnest(hits) as hits,
unnest(product) as product
where
totals.visits = 1
group by
user_type
order by
all_sessions desc
这里是结果:
这是针对会话的,我有一个类似的针对放弃的。 我找不到任何提供结帐阶段的字段,因此我也可以复制结帐报告渠道。这些阶段是 'current order'、'shipping billing method'、'order confirmation' 和相对下降。 提供购物阶段的字段是 'hits.ecommerceaction.action_type',是否有用于结帐的字段?
您可以使用 hits.eCommerceAction.step 获取结帐流程的步骤。
当通过命中指定结帐步骤时,将填充此字段。