質問 > 管理機能 > Googleアナリティクスへの購入金額反映について |
管理機能
スレッド表示 | 古いものから | 前のトピック | 次のトピック | 下へ |
投稿者 | スレッド |
---|---|
coremobile |
投稿日時: 2020/10/28 20:50
対応状況: −−−
|
長老 登録日: 2018/8/30 居住地: 投稿: 186 |
Re: Googleアナリティクスへの購入金額反映について 完了画面「shopping/complete.php」に入れているタグだとは思いますが、ショッピング完了画面でprint_rをしてみて「$arrGAOrder」という箇所に値が入っておりますでしょうか?
|
tiaretia.s |
投稿日時: 2020/10/21 14:48
対応状況: −−−
|
新米 登録日: 2020/10/21 居住地: 投稿: 1 |
Googleアナリティクスへの購入金額反映について ▼テンプレート
[EC-CUBE] 2.13.5 [現象] EC-CUBEのThanksページ内にGAに購入金額データを送るスニペットを入れていたのですが、GAタグを最新版にアップデートしてから、購入金額の反映がされなくなってしまいました。 こちらについてタグをどのように書き換えれば購入金額がGAに送信されるようになるのかわかる方がいらっしゃいましたらご教示いただきたいです…。 ▼現在設定しているタグ <!-- Google Analytics eコマース --> <script> window.dataLayer = window.dataLayer || [] dataLayer.push({ 'transactionId': '<!--{$arrGAOrder.order_id}-->', 'transactionAffiliation': 'xxxxxx', 'transactionTotal': '<!--{$arrGAOrder.total}-->', 'transactionTax': '<!--{$arrGAOrder.tax}-->' 'transactionShipping': '<!--{$arrGAOrder.deliv_fee}-->', 'transactionProducts': [{ 'sku': '<!--{$arrGAOrderDetail[cnt].product_code}-->', 'name': '<!--{$arrGAOrderDetail[cnt].product_name}-->', 'category': '<!--{$arrGAOrderDetail[cnt].category_name}-->', 'price': '<!--{$arrGAOrderDetail[cnt].price}-->', 'quantity': '<!--{$arrGAOrderDetail[cnt].quantity}-->' }] }); </script> <script> ga('create', 'UA-xxxxxxx-1 ' http://xxxxxxx.jp'); ga('require', 'ecommerce'); ga('ecommerce:addTransaction', { 'id': '<!--{$arrGAOrder.order_id}-->', 'affiliation': 'xxxxxx', 'revenue': '<!--{$arrGAOrder.total}-->', 'shipping': '<!--{$arrGAOrder.deliv_fee}-->', 'tax': '<!--{$arrGAOrder.tax}-->' }); <!--{section name=cnt loop=$arrGAOrderDetail}--> ga('ecommerce:addItem', { 'id': '<!--{$arrGAOrder.order_id}-->', 'name': '<!--{$arrGAOrderDetail[cnt].product_name}-->', 'sku': '<!--{$arrGAOrderDetail[cnt].product_code}-->', 'category': '<!--{$arrGAOrderDetail[cnt].category_name}-->', 'price': '<!--{$arrGAOrderDetail[cnt].price}-->', 'quantity': '<!--{$arrGAOrderDetail[cnt].quantity}-->' }); <!--{/section}--> ga('ecommerce:send'); </script> <!-- End Google Analytics eコマース --> システム関連について素人のものでして、皆様のお知恵をお借りできればと存じます…。 何卒宜しくお願い致します。 |
スレッド表示 | 古いものから | 前のトピック | 次のトピック | トップ |