Try the Demo

Magento Forum

   
Page 4 of 4
Google Analytics can not track all sales transactions
 
One Pica
Sr. Member
 
Avatar
Total Posts:  193
Joined:  2009-02-27
Boston, MA
 

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:

Mage::dispatchEvent('checkout_onepage_controller_success_action');

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:

<?xml version="1.0"?>
<config>
    <
modules>
        <
YourNamespace_YourModule>
            <
version>1.0</version>
        </
YourNamespace_YourModule>
    </
modules>
    <
frontend>
        <
events>
            <
controller_action_layout_render_before_checkout_multishipping_success>
                <
observers>
                    <
googleanalytics_multiship_order_success>
                        <
type>singleton</type>
                        <class>
googleanalytics/observer</class>
                        <
method>order_success_page_view</method>
                    </
googleanalytics_multiship_order_success>
                </
observers>
            </
controller_action_layout_render_before_checkout_multishipping_success>
        </
events>
    </
frontend>
    <global>
        <
models>
            <
checkout>
                <
rewrite>
                    <
type_multishipping>YourNamespace_YourModule_Model_Type_Multishipping</type_multishipping>
                </
rewrite>
            </
checkout>
        </
models>
    </global>
</
config>

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;
    
}
}

 Signature 

One Pica, Inc.
Marketing + Technology Agency
Boston, MA
http://www.onepica.com/

Magento Enterprise Partner

Marketing Agency Ecommerce Magento Design Magento Development

 
Magento Community Magento Community
Magento Community
Magento Community
 
snarkys
Sr. Member
 
Total Posts:  124
Joined:  2008-04-04
 

I run 1.6 and am also having this issue. 30-40% of the orders don’t show up. and there doesn’t seem to be any pattern. Happens to both PP and CC.

 
Magento Community Magento Community
Magento Community
Magento Community
 
snarkys
Sr. Member
 
Total Posts:  124
Joined:  2008-04-04
 

is it possible to turn off the installed module and implement Google analytics a different way ?

 
Magento Community Magento Community
Magento Community
Magento Community
 
snarkys
Sr. Member
 
Total Posts:  124
Joined:  2008-04-04
 
blackhalo - 06 September 2009 10:58 PM

eitai2001 - 23 August 2009 12:39 PM
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 ....

 
Magento Community Magento Community
Magento Community
Magento Community
 
cocaine
Jr. Member
 
Total Posts:  2
Joined:  2010-10-28
 
skippybosco - 24 February 2009 07:08 PM

Express can also pre-populate your customer address info in Magento I believe.

For those in the US, I still think PayPal payment Pro is the best choice. Keeps users on your site throughout the entire transaction:

https://www.paypal.com/cgi-bin/webscr?cmd=_profile-comparison

Should I pay extra for Paypal Payment Pro?

Don’t tell me to look into paypal please because for some reason I can’t visit paypal payment pro page. Could be because I am currently not in USA.

Thanks

 Signature 

nikon coolpix reviews

 
Magento Community Magento Community
Magento Community
Magento Community
 
salimsazzad
Jr. Member
 
Total Posts:  18
Joined:  2011-07-02
 

Now you can easily set up google analytics from magento admin panel just following the below link:

http://www.salimsazzad.com/how-to-set-up-google-analytics-from-magento-backend

 
Magento Community Magento Community
Magento Community
Magento Community
 
destatanka
Jr. Member
 
Total Posts:  1
Joined:  2012-07-07
 
skippybosco - 24 February 2009 07:08 PM

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:

https://www.paypal.com/cgi-bin/webscr?cmd=_profile-comparison

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top
Page 4 of 4