LoginSignup
1
2

More than 3 years have passed since last update.

拡張eコマースでカスタム指標を使用する場合のデータレイヤー例(CVページ)

Last updated at Posted at 2021-02-14

Google アナリティクス、ユニバーサルアナリティクスの場合です。
こちらのブログで出てくるタグで、別途Google アナリティクスやGoogle タグマネージャでの設定が必要となります。

conversion_page.js
<script>
    dataLayer.push({
        "ecommerce":{
        "purchase":{
        "actionField":{
        "id":"xxxx-xxxx-xxxx",//購入ID
        "revenue":,//収益
        "tax":
    },
    "products":[{//購入商品の種類に応じてノード数は変動させる
        "id":"",
        "name":"",//商品名
        "price":,//個別の商品の料金(price*quantityで合計値と等しくなるように。そうしないとレポート上での「商品の収益」の値がおかしくなる)
        "quantity":,//商品の個数
        "metric1":,//カスタム指標1(pricequantity異なり、商品全体の総数を書き出すようにする)
        "metric2":,//カスタム指標2
        "metric3":,//カスタム指標3
        "metric4": //カスタム指標4
    },{
        "id":"",
        "name":"",
        "price":,
        "quantity":,
        "metric1":,
        "metric2":,
        "metric3":,
        "metric4":
    }]
}
}
});
</script>
1
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
2