1

テストを実行した結果、Google オプティマイズのデータ​​を BigQuery でエクスポートしたいと考えています。残念ながら、BigQuery Export の変数「experimentId」と「experimentVariant」は両方とも空です。Google アナリティクスにはこの期間のテスト データがありますが。

シンタックスに問題はありますか?標準SQL:

SELECT 
clientId,
visitId,
fullVisitorId,
exp.experimentId AS experimentId,
exp.experimentVariant AS experimentVariant,
trafficSource.source AS source,
trafficSource.medium AS medium,
hits.page.pagePath AS pagePath,
timestamp_seconds(visitStartTime+(CAST(ROUND(hits.time/1000) AS INT64))) 
AS timestamp,
hits.eventInfo.eventCategory AS EventCategory,
hits.eventInfo.eventAction AS EventAction,
hits.eventInfo.eventLabel AS EventLabel

FROM `123456789.ga_sessions_*` LEFT JOIN
UNNEST(hits) hits LEFT JOIN
UNNEST(hits.experiment) exp

WHERE hits.page.pagePath LIKE '%page1/page2%' AND _TABLE_SUFFIX BETWEEN 
FORMAT_DATE('%Y%m%d', date '2019-04-16') AND FORMAT_DATE('%Y%m%d', date 
'2019-04-22') 

GROUP BY 
clientId,
visitId,
fullVisitorId,
experimentId,
experimentVariant,
source,
medium,
pagePath,
timestamp,
eventCategory,
EventAction,
EventLabel
4

0 に答える 0