Using Magento CE

We are using Google Analytics to track conversions on our site. We implemented this using the built-in Google API section in the admin panel. It provides enough information including transaction (order) numbers, order amounts, browser data, etc..

I believe this data is submitted upon loading the success page. With that being said, I would like to submit certain data from checkout page - before the order is ever completed. For example, I would like to push the billing address as soon as they fill out the form.

Background: We use an address validation service and sometimes the address that the validation service submits to us isn't correct. It can "over correct" and completely strip vital details from certain addresses. Happens less than 1% of the time but when that is multiplied against 1000 - 2000 orders a day it can really become a problem for our fulfillment department. Yes, we have reported this to the address validation service and they tell us they are investigating it.

I plan to use jQuery to grab the form data in the billing and shipping fields and when the user fills out all necessary fields, do a push to GA.

My question then. If I push custom variables to Google Analytics prior to completing an order, will GA be able to associate that session with my completed transaction?

  • 1
    It should be noted that a customer's address is considered "Personally Identifiable Information", which google analytics does not allow. I would read up on the GA policies before deciding what data to push from your site.
    – DaChronDon
    Jan 26, 2015 at 23:23

1 Answer 1


Using the step option I believe Google is smart enough to relate the same session to a completed order afterwards.

For each step in your checkout process, you'll need to implement the corresponding tracking code to send data to Google Analytics.

Step Field

For each checkout step that you measure you should include a step value. This value is used to map your checkout actions to the labels you configured for each step in Ecommerce Settings.

Note: If you have a single step checkout process or if you have not configured a checkout-funnel in Ecommerce Settings then the step field is optional. Option Field

If you have additional information about the given checkout step at the time the step is measured, you can set the option field with a checkout action to capture this information. For example, the default payment type for the user (e.g. ‘Visa’).

Measuring a Checkout Step

To measure a checkout step, use ec:addProduct for each product, and ec:setAction indicate a checkout. If applicable, ec:setAction can take an additional actionFieldObject to describe the checkout step with a step and an option.

More Details:

Alternatively you could use a more advanced 3rd party module to implement more of the full Ecommerce steps:

DISCLAIMER: Have not used this before but worth a try or even may help give insight on implementing your own approach:

  • 1
    Thank you B00MER! That is exactly what I needed. I will log events for a day or two and comment if there are any unexpected results.
    – sparecycle
    Jan 6, 2015 at 18:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.