As noted above, GA transaction tracking isn’t automatic with Multishipping Checkout. It’s not a bug in Magento; instead, it’s more of an omission. To implement transaction tracking, you’ll have to extend Magento.
Onepage Checkout adds transaction javascript calls to the GA block using an event observer. In Mage_Checkout_OnepageController->successAction(), the following event is dispatched:
The observer model/method listens for this event in Mage_GoogleAnalytics_Model_Observer->order_success_page_view(). That method grabs the GA block and assigns the last quote ID from the checkout session. When the Mage_GoogleAnalytics_Block_Ga block is rendered on every page load, it checks for a set quote and writes GA transaction javascript for each associated order. See Mage_GoogleAnalytics_Block_Ga->getQuoteOrdersHtml() for details.
To mimic the Onepage functionality in Multishipping Checkout, you’ll have to create a new local module with only a config.xml file. In that file, you’ll need to listen for the multishipping success action:
You’ll also have to set the last quote ID in the multishipping checkout session. A model rewrite in the XML above will allow you to accomplish that with the class below:
class YourNamespace_YourModule_Model_Type_Multishipping extends Mage_Checkout_Model_Type_Multishipping { public function createOrders() { parent::createOrders(); Mage::getSingleton('checkout/session')->setLastQuoteId($this->getQuote()->getId()); return $this; } }
For you guys that are having intermittent orders being tracked like I am. Check if any of the orders NOT tracked have any products with quotation marks.
That was the answer for me… and I’m using ZenCart at the moment!!
It appears Google Analytics does NOT like quotes… *sigh*
I couldn’t figure it out, everything was working fine…
then all of a sudden tracking is intermittent… we added new products w/ quotes. yup.
Huge thanks to “eitai2001” for dropping the tip!
This is indeed the cause of the problem for us as well . Is there any way to get around this without taking the quotes out ? many of our products are fittings with inch sizes ....
Express can also pre-populate your customer address info in Magento I believe.
sexy back dresses
For those in the US, I still think PayPal payment Pro is the best choice. Keeps users on your site throughout the entire transaction: