When Are Purchases Added or Removed From Google Analytics?

Are recent eCommerce sales not being reflected in Google Analytics when you expect them to?

Google Analytics has specific requirements for adding or removing purchases from your analytics data. Follow this guide to learn more about these requirements as well as learning about the hooks related (for developers).

For WooCommerce

Assuming orders are new and have no previous status, orders will be added when its’ status is updated to processing or completed.

Orders will be removed when the status updates…

  • From completed to refunded.
  • From processing to refunded.
  • From on-hold to refunded, trash, or canceled.
  • From on-hold to trash.

For Easy Digital Downloads

Orders will be added when the order is completed (published).
Orders will be removed when the order goes from complete (published) to trash status or refunded.

For MemberPress

Orders will be added when the order is completed.
Orders will be removed when the order is refunded.

For LifterLMS

Orders will be added when the order is completed.
Orders will be removed when the order is refunded.

Hooks For Developers

The transitions above are detected using the following hooks.

WooCommerce

Add to GA

  • woocommerce_order_status_completed
  • woocommerce_order_status_processing

Remove from GA

  • woocommerce_order_status_completed_to_refunded
  • woocommerce_order_status_on-hold_to_refunded
  • woocommerce_order_status_processing_to_refunded
  • woocommerce_order_status_processing_to_cancelled
  • woocommerce_order_status_completed_to_cancelled
  • woocommerce_order_status_pending_to_cancelled
  • woocommerce_order_status_pending_to_failed
  • wc-on-hold_to_trash
  • wc-processing_to_trash
  • wc-completed_to_trash

Easy Digital Downloads

Add to GA

  • edd_complete_purchase

Remove from GA

  • edd_update_payment_status
  • edd_payment_delete

MemberPress

Add to GA

  • mepr-txn-status-complete
  • mepr-txn-status-confirmed

Remove from GA

  • mepr-txn-status-refunded

LifterLMS

Add to GA

  • lifterlms_order_status_completed
  • lifterlms_order_status_active

Remove from GA

  • lifterlms_order_status_refunded
  • lifterlms_order_status_cancelled
  • lifterlms_order_status_failed
  • lifterlms_order_status_on-hold
  • lifterlms_order_status_trash