mardi 26 juillet 2016

Magento Google Analytics Product Category not set

I am trying to track product category from magento to GA, (under Conversions>Ecommerce>overview), but with magento default core GA.php file dosent including this part: /app/code/core/Mage/GoogleAnalytics/Block/Ga.php

foreach ($order->getAllVisibleItems() as $item) {
                $result[] = sprintf("_gaq.push(['_addItem', '%s', '%s', '%s', '%s', '%s', '%s']);",
                    $order->getIncrementId(),
                    $this->jsQuoteEscape($item->getSku()), $this->jsQuoteEscape($item->getName()),
                    null, // there is no "category" defined for the order item
                    $item->getBasePrice(), $item->getQtyOrdered()
                );
            }

*see, they commend out category field and put null right there.

I am looking for a solution that do not modify the magento in the /core, but solve the problem in /local.

BTW, I am using magento 1.7

hopefully someone could help me out, many thx :D

Aucun commentaire:

Enregistrer un commentaire