diff --git a/commerce_google_analytics.module b/commerce_google_analytics.module
index 28dd1bf..24148fd 100644
--- a/commerce_google_analytics.module
+++ b/commerce_google_analytics.module
@@ -83,9 +83,31 @@ function commerce_google_analytics_ecommerce_js($order) {
 
   }
   
-  $profile = commerce_customer_profile_load($order->commerce_customer_billing->profile_id->value());
-  $address = $profile->commerce_customer_address[LANGUAGE_NONE][0];
+  $profile = null;
+  if (isset($order->commerce_customer_billing) && $order->commerce_customer_billing->value()) {
+    $profile = commerce_customer_profile_load($order->commerce_customer_billing->profile_id->value());
+  }
+  elseif (isset($order->commerce_customer_shipping) && $order->commerce_customer_shipping->value()) {
+    $profile = commerce_customer_profile_load($order->commerce_customer_shipping->profile_id->value());
+  }
   
+  $address = null;
+  if ($profile) {
+		$profile_wrapper = entity_metadata_wrapper('commerce_customer_profile', $profile);
+    $address = $profile_wrapper->commerce_customer_address->value();
+    $address_field = addressfield_generate($address, array('address'), array('mode' => 'render'));
+
+    // Get country human readable name.
+    $country_code = $address['country'];
+    $address['country'] = $address_field['country']['#options'][$country_code];
+
+    // Get state human readable name - but only if there was a select list.
+    if (!empty($address_field['locality_block']['administrative_area']['#options'])) {
+      $state_code = $address['administrative_area'];
+      $address['administrative_area'] = $address_field['locality_block']['administrative_area']['#options'][$state_code];
+    }
+  }
+
   // Build the transaction arguments.
   $transaction = array(
     'order_id' => $order->order_id->value(),
@@ -93,9 +115,9 @@ function commerce_google_analytics_ecommerce_js($order) {
     'total' => commerce_currency_amount_to_decimal($order->commerce_order_total->amount->value(), $order->commerce_order_total->currency_code->value()),
     'tax' => $tax_sum,
     'shipping' => $shipping,
-    'city' => $address['locality'],
-    'state' => '',
-    'country' => $address['country'],
+    'city' => ($address ? $address['locality'] : ''),
+    'state' => ($address ? $address['administrative_area'] : ''),
+    'country' => ($address ? $address['country'] : ''),
   );
   
   // Allow modules to alter the transaction arguments.
