設定及測試「透過購物車資料回報的轉換」相關報表

本文將說明如何設定「透過購物車資料回報的轉換」,以及提交購物車資料的方式。進一步瞭解「透過購物車資料回報的轉換」相關報表

操作說明

要記錄「透過購物車資料回報的轉換」,需要仰賴您網站上現有的轉換追蹤。請務必先設定轉換追蹤,才能提交購物車資料。或者,您也可以匯入 Google Analytics (分析) 4 轉換。如果目前已使用 SA360 轉換追蹤,只要將購物車資料加到現有的轉換標記即可。

請與您的網頁程式開發人員聯絡,瞭解如何傳送動態產生的資料,例如轉換過程中所售產品的 ID。

新增購物車資料參數

如要提交購物車資料,您必須在事件程式碼片段中加入以下額外參數:

參數 值類型 範例值 說明
event 字串 「purchase」 系統只會處理購物車資料中的「purchase」事件。

discount

(選用)

浮點值 1.50

$1.50 美元的折扣會套用到整筆訂單,例如:

  • 免運費
  • 限時優惠

注意:如果使用 Google Analytics (分析) 做為轉換來源,系統不支援 discount 參數。

aw_merchant_id

(選用)

整數 98765 Merchant Center ID。如果您在數個 Merchant Center 帳戶中提交某項商品,並想控管系統應從哪個 Merchant Center 帳戶讀取商品資料 (例如銷貨成本),請提供這項參數。

aw_feed_country

(選用)

字串 「US」

此為與上傳商品所在動態饋給相關聯的國家/地區,請使用 CLDR 地域代碼。

注意:如果使用 Google Analytics (分析) 做為轉換來源,請改用 aw_feed_label 參數。

aw_feed_language

(選用)

字串 「EN」 此為與上傳商品所在動態饋給相關聯的語言,請使用 ISO 639-1 語言代碼。

aw_feed_label

(選用)

字串 「feed_label」

這是與上傳商品所在動態饋給相關聯的標籤

注意:只有在使用 Google Analytics (分析) 做為轉換來源時,系統才支援這個參數。

items 陣列 [{
id: "P12345",
price: 12.50,
quantity: 2
}]
各項售出商品的價格、數量和商品 ID 所構成的陣列。
items.id 字串 「P12345」

售出產品的商品 ID,必須與 Merchant Center 中使用的商品 ID 相符。

注意:如果使用 Google Analytics (分析) 做為轉換來源,系統支援替代參數 items.item_id。

items.price 浮點值 12.50 單一商品的銷售價格 (不含稅金、運費和任何交易層級折扣)。
items.quantity 整數 2 商品售出數量。

 

包含購物車資料的 Google 代碼導入範例

<!-- Sample Code Conversion -->
<script type="text/javascript">
gtag('event', 'purchase', {
  "send_to": "AW-9999999999/abc123xyz",
  "transaction_id": "1545c34e-691e-4726-aeda-b798df255e9c",
  "value": 53.50,
  "currency": "USD",
<!-- Start of CwCD Parameters -->
  "discount": 1.50,
  "aw_merchant_id": 98765,
  "aw_feed_country": "US",
  "aw_feed_language": "EN",
  "items": [
    {
      "id": "P12345",
      "quantity": 2,
      "price": 12.50
    },
    {
      "id": "P67890",
      "quantity": 1,
      "price": 30.00
    }
  ]
<!-- End of CwCD Parameters -->
});
/* ]]> */
</script>

資料層導入範例

<!-- Sample Code datalayer push -->
dataLayer.push({
"event": 'purchase',
"transaction_id": "1545c34e-691e-4726-aeda-b798df255e9c",
"value": 53.50,
"currency": "USD",
<!-- Start CwCD Parameters datalayer push -->
"discount": 1.50,
"aw_merchant_id": 98765,
"aw_feed_country": "US",
"aw_feed_language": "EN",
"items": [
  {
    "id": "P12345",
    "quantity": 2,
    "price": 12.50
  },
  {
    "id": "P67890",
    "quantity": 1,
    "price": 30.00
  }
]
<!-- End CwCD Parameters datalayer push -->
});

使用 JavaScript 變數向 Google 代碼管理工具提供購物車資料的範例

<!-- Sample Code JavaScript Variables-->
<script type="text/javascript">
transaction_id = "1545c34e-691e-4726-aeda-b798df255e9c";
value = 53.50;
currency = "USD";
<!-- Start of CwCD Parameters -->
discount = 1.50;
aw_merchant_id = 98765;
aw_feed_country = "US";
aw_feed_language = "EN";
items = [
{
  "id": "P12345",
  "quantity": 2,
  "price": 12.50
},
{
  "id": "P67890",
  "quantity": 1,
  "price": 30.00
}
];
<!-- End of CwCD Parameters -->
/* ]]> */
</script>

提供銷貨成本動態饋給屬性,將利潤率列在報表上

如要取得利潤報表,您必須在 Merchant Center 產品動態饋給中提供 cost_of_goods_sold 動態饋給屬性。瞭解如何建立動態饋給

Cost_of_goods_sold (銷貨成本) 代表您所售產品的成本,Google Ads 會使用這項屬性來計算每項產品的利潤率 (利潤 = 收益 - 銷貨成本)。如果沒有精確的產品銷貨成本資料,但您仍想查看利潤報表,建議採用銷貨成本的約略值。舉例來說,您可以預估銷貨成本是產品價格的 80%。

提供銷貨成本資料的方式有下列 3 種:

如果您選擇不提供 cost_of_goods_sold 動態饋給屬性,報表中就不會列出某些指標 (例如銷貨成本和毛利) 的值。

測試「透過購物車資料回報的轉換」是否正確導入

如果無法取得「透過購物車資料回報的轉換」指標,或指標顯示錯誤,請確認是否正確導入轉換標記參數。做法是按照以下步驟完成測試訂單,查看參數能否正確傳送:

  1. 按一下 Google Chrome 網路瀏覽器右上角的 Chrome 選單 ,然後依序選取「更多工具」>「開發人員工具」,開啟 Chrome 開發人員工具。
  2. 在「開發人員工具」窗格中,選取「網路」
  3. 在 Google Chrome 網路瀏覽器中提交測試訂單。
  4. 搜尋包含轉換的要求 (搜尋「/conversion」)。查詢字串參數應包含購物車參數,如以下範例所示:

mid = aw_merchant_id
fcntr = aw_feed_country
flng = aw_feed_language
dscnt = discount
bttype = event type
item = items (the array) mapping all items with (items.id * items.price * items.quantity)

相關連結

這對您有幫助嗎?

我們應如何改進呢?
true
Achieve your advertising goals today!

Attend our Performance Max Masterclass, a livestream workshop session bringing together industry and Google ads PMax experts.

Register now

搜尋
清除搜尋內容
關閉搜尋
主選單
2075935150341072427
true
搜尋說明中心
true
true
true
true
true
73067
false
false
false