When Are Purchases Added or Removed From Google Analytics?

Are you not seeing recent eCommerce sales reflected in Google Analytics when you expect them? Google Analytics has very specific requirements for adding and removing purchases to your analytics data. In this guide, we’ll go over all the conditions for adding and removing purchases to Google Analytics, including information on hooks for developers.

For WooCommerce

Orders are added when the order changes to the completed or processing status (as a new order; no previous status).

Orders are removed when:

  • The order goes from completed to refunded
  • The order goes from processing to refunded
  • The order goes from on-hold to refunded to refunded, trash, or canceled
  • The order goes from on-hold to trash

For Easy Digital Downloads

Orders are added when the order is completed (published).

Orders are removed when the order goes from complete (published) to trash status or refunded.

For MemberPress

When an order is completed MonsterInsights will add the order to Google Analytics.

When an order is refunded MonsterInsights will remove the order from Google Analytics.

For LifterLMS

When an order is completed MonsterInsights will add the order to Google Analytics.

When an order is refunded MonsterInsights will remove the order from Google Analytics.

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

MemberPress

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