「DuracellTomiのGoogleタグマネージャー」と呼ばれるwordpressのgoogleタグマネージャープラグインを使用しています。私はそれに電子商取引オプションを有効にしました。私がテスト注文を送るとき、あなたはカスタムのありがとうページに転送されました。タグマネージャーのeコマースデータレイヤー
transactionId': '1234',
'transactionAffiliation': 'Acme Clothing',
'transactionTotal': 38.26,
'transactionTax': 1.29,
'transactionShipping': 5,
'transactionProducts': [{
'sku': 'DD44',
'name': 'T-Shirt',
'category': 'Apparel',
'price': 11.99,
'quantity': 1
},{
'sku': 'AA1243544',
'name': 'Socks',
'category': 'Apparel',
'price': 9.99,
'quantity': 2
:私はこのような何かを期待
:その上、私はJavaScriptコンソールモードに入り、そこに私は「dataLayer」と入力して、これは
出力であるあなたのページに感謝
希望の出力を得るには何が必要ですか?\
編集:
私のカスタムページは次のように設定されているあなたに感謝:
// Redirect custom thank you
add_action('woocommerce_thankyou', 'bbloomer_redirectcustom');
function bbloomer_redirectcustom($order_id){
$order = new WC_Order($order_id);
$url = 'http://dexport.nl/bedankt';
if ($order->status != 'failed') {
wp_redirect($url);
exit;
}
}