2016-09-29 11 views
0

Googleの支払いフローが1ページのアプリケーションに移行しましたので、拡張eコマースデータをGoogleアナリティクスに送信する方法を調整する必要があります。スイッチの前にeコマースデータを正常に受信していました。拡張eコマース、シングルページアプリケーションとタグマネージャ

Googleアナリティクスのコードはタグマネージャ経由で注入されており、仮想ページURLを使用してファンネルデータを送信しようとしましたが、まだ成功していません。

これを実装する最善の方法は何ですか?

編集:私たちは現在、datalayerを介してデータを利用できるようにしようとしていると、タグマネージャデバッガ以内にそれを見ているが、それは以下のGoogleアナリティクスへ

コードを取得していないように見えます - eコマースデータは、目標到達プロセスの各段階で送信されます。

ステップ1:

window.dataLayer.push(window.GA_DATA_OBJECT_START); ga('set', 'page', `/profile/?purchaseView=true&product=${this.state.product}`); ga('send', 'pageview');

ステップ2:

ga('set', 'page', `/profile/?billingConfirmed=true&product=${this.state.product}`); ga('send', 'pageview');

ステップ3:

window.dataLayer.push(window.GA_DATA_OBJECT_END); ga('set', 'page', `/profile/?purchaseSuccess=true&product=${this.state.product}`); ga('send', 'pageview');

+0

のような印象のための使用、この? – manzapanza

+0

私たちは反応しています –

+0

あなたはすでに反応を見ましたか? https://github.com/react-ga/react-ga – manzapanza

答えて

0

その単一ページのアプリケーションいけない場合送信ページビューを使用します。

​​

別の例

window.ga("ec:addProduct", { 
       "id": booking._id,     // Product ID (string). 
       "name": booking.name, // Product name (string). 
       "category": booking.services[0].category,   // Product category (string). 
       "brand": booking.storeTitle,    // Product brand (string). 
       "price": booking.price,     // Product price (currency). 
       "quantity": 1 
      }); 
      window.ga("ec:setAction", "purchase", {   // Transaction details are provided in an actionFieldObject. 
       "id": booking._id,      // (Required) Transaction id (string). 
       "revenue": booking.companyService.actualPrice,      // Revenue (currency). 
       "coupon": booking.coupon     // Transaction coupon (string). 
      }); 
      window.ga("send", "event", "Form", "Submit", "Booking Form"); 

のみSPAフレームワークは、使用している

window.ga("ec:addImpression", { 
    "id": companyId,     // Product details are provided in an impressionFieldObject. 
    "name": companyInfo.name, 
    "category": companyInfo.category, 
    "list": "Company Info" 
}); 
window.ga("ec:setAction", "detail"); 
window.ga("send", "pageview"); 
+0

は、データをデータレイヤー経由で利用できるようにするためにはこれが望ましいでしょうか?これまでにやってきたアプローチです(元の質問では申し訳ありませんが修正する予定です) –

関連する問題