將 Google Analytics 將歷史資料擷取至 Adobe Experience Platform

此頁面著重於將您的 Google Analytics 歷史資料擷取到 Adobe Experience Platform 做為資料集,讓您參照在 Customer Journey Analytics 之內「資料檢視」中的資料集。 您可以結合此頁面的步驟與設定一個 Google Analytics 實作,這會產生反覆出現的資料集。 結合此歷史資料集與最新實作的資料集,以便在 Customer Journey Analytics 中取得現在與回填資料的無縫接軌檢視。

先決條件

為了完成這些工作,您需要下列存取權和權限:

  • 存取 Adobe Experience Platform
  • 存取 Google Analytics (GA 標準版或 GA 360)
  • 管理員存取 Customer Journey Analytics

設定 BigQuery Export

Universal Analytics 屬性中的資料結構異於 Google Analytics 4 屬性中的資料結構。 根據您想要匯出資料的屬性類型設定 BigQuery Export:

用於 Universal Analytics 屬性的其他要求

NOTE
此節僅適用於 Universal Analytics 屬性。 如果您從 GA4 屬性匯出,您可以前往將資料匯出至 Google Cloud Platform

Universal Analytics 屬性會將其資料中的每一筆記錄儲存為使用者的工作階段,而非個別事件。 SQL 查詢將 Universal Analytics 資料轉換為與 Adobe Experience Platform 相容的格式是必要的。 將 UNNEST 函式套用到 hits GA 結構描述中的欄位,並儲存為 BigQuery 表格。

SELECT
   *,
   timestamp_seconds(`visitStartTime` + hit.time) AS `timestamp`
FROM
   (
      SELECT
         fullVisitorId,
         visitNumber,
         visitId,
         visitStartTime,
         trafficSource,
         socialEngagementType,
         channelGrouping,
         device,
         geoNetwork,
         hit
      FROM
         `example_bq_table_*`,
         UNNEST(hits) AS hit
   )

將資料匯出至 Google Cloud Platform export-gcp

在 Google Cloud Platform 中前往​ 「匯出」 > 「匯出至 GCS」。 在資料進入 Google Cloud Storage 時,就已準備好可以被拉進 Adobe Experience Platform 中。

將資料從 Google Cloud Storage 匯入到 Experience Platform

  1. 在 Adobe Experience Platform 中選擇左邊的​ 「來源」
  2. 在「目錄」下方找出 Google Cloud Storage 選項。 按一下「新增資料」。
TIP
如果您計畫同時匯入歷史與即時串流 Google Analytics 資料,這二個資料集請務必使用相同的結構描述。您可以使用合併的資料集在Customer Journey Analytics中合併資料集。

您可以將 GA 事件資料對應到您之前建立的現有資料集中,或是使用您選擇的任何 XDM 結構描述建立新的資料集。 當您選取結構描述後,Experience Platform 會套用機器學習,自動地將 Google Analytics 資料中的每個欄位預先對應到您的 XDM 結構描述

結構描述對應,醒目提示GA資料欄位和目標結構描述對應

當您完成將欄位對應到 XDM 結構描述中的作業後,您可以將這項匯入排程為定期進行,並在擷取過程中套用錯誤驗證。 此驗證可確保您已匯入的資料不會有任何問題。

必填的 XDM 欄位

在 Platform 中特定的 XDM 欄位需要正確的格式才能正確地處理資料。

  • timestamp:在 Experience Platform 結構描述 UI 中建立一個特別的計算欄位。 按一下「新增計算欄位」,並讓 date 函數中的 timestamp 字串換行:

    date(timestamp, "yyyy-MM-dd HH:mm:ssZ")

    將此計算欄位儲存到結構描述中的時間戳記資料結構內:

    時間戳記

  • _id:此欄位中必須有值 — Customer Journey Analytics不在乎該值為何。 您可以新增「1」到欄位中:

    ID

後續步驟

recommendation-more-help
080e5213-7aa2-40d6-9dba-18945e892f79