2017-09-18 4 views
0

分析ダッシュボードのeコマースビューにデータが送信されていますが、アイテムはトランザクションに添付されていません。 。Googleのeコマースデータ - 取引に添付されていないアイテム

私は間違っているのですか?商品が取引に添付されるべきですか?私はここで間違っています。

// Build e-commerce items for each item groups 
      let items = _.map(basket.item_groups, (group) => { 
       let category = group.type && 'events' || 'products'; 
       let id = group.type && `tt-${group.type}` || `pa-${group.product_attribute}`; 
       return { 
        'id': id, 
        'name': group.description, 
        'sku': id, 
        'category': category, // causes problems if removed entirely 
        'price': group.price, 
        'quantity': group.quantity, 
        'currency': basket.currency, 
       }; 
      }); 

      let transaction = { 
       'id': basket.id, // Transaction ID. Required. 
       'affiliation': basket.payment_venue, // Affiliation or store name. 
       'revenue': basket.total_price, 
       'shipping': 0, 
       'tax': basket.taxes, 
      }; 

      this.call(`${this.namespace}.ecommerce:addTransaction`, transaction); 

      _.each(items, (item) => { 
       this.call(`${this.namespace}.ecommerce:addItem`, item); 
      }); 

      this.call(`${this.namespace}.ecommerce:send`); 

pa- and tt- are items

Transaction detail

答えて

0

あなたの項目のためのidプロパティは、それがあることが必要であるトランザクションIDに設定されていないように見えます。代わりに、各製品にのSKU/IDをidskuフィールドの両方に付与しています。したがって、すべての項目があることが必要である古典的なeコマーストラッキングで

'id': basket.id, 

を、項目および取引は(拡張eコマースとは違って)個別のヒットとして送信され、:項目を定義する場合、あなただけの必要なように見えます

トランザクションにリンクされています。その代わりに、トランザクションIDの代わりにSKUのトランザクションに商品を割り当てます。これは、収益を出さないトランザクションとして表示される理由です。

関連する問題