This article is produced with scandiweb's eCommerce expertise

Collaborate with our development, PPC, SEO, data & analytics, or customer experience teams to grow your eCommerce business.

Case Study: Multiple Payment Systems and Order Tracking

scandiweb’s Analytics team set up Google Analytics (GA) in Magento for an international sports apparel company for eCommerce Orders and Revenue tracking. However, GA reported higher numbers than the ERP system because canceled orders were also recorded. One seemingly simple way to resolve this was to capture data only after receiving an invoice—so that only completed transactions were reported. Then again, that approach led to a loss of information on traffic sources, and obtaining an invoice for every transaction was not possible.

Here’s how we implemented order tracking by sending GA measurement protocol hits from Magento Admin on order creation and refund tracking using the same protocol—getting very close to 100% accuracy in Google Analytics for all orders received and still retaining valuable traffic information.

Challenge

The most basic Google Analytics setup involves capturing hits or interactions between the users and a website. We can easily see how many users visited the website, viewed product pages, added items to carts, etc., if we configure GA correctly. Most of the time, however, complex processes need to be considered before we can get to the information we want to know. And we need to understand those processes as fully as we understand how GA works to be able to come up with a solution.

In this case, GA reported more transactions and revenue than the ERP system. So, we deployed an ordered cancellation solution to exclude unsuccessful orders from the reports. However, the total order number was still inflated, and traffic source data still didn’t match the reported transactions.

We then tried capturing data only after we received the invoice to ensure that we were getting more accurate transactions and revenue statistics. But, we lost traffic allocation with that strategy. And waiting for the invoice was not an option for one of the payment methods the client used. 

The client had several payment systems in place—OXXO, Andyen, and PayPal—and each one behaved differently.

For more context, it often took more than 30 minutes for payment confirmation from Andyen to arrive, which is the timeframe at which a session in GA is terminated. This meant that if an Order hit arrived 30 minutes after the order was placed on the store or after checkout, the user’s session could not be accurately tied to the original traffic source (where the user came from before placing the order).

With OXXO, users didn’t pay online, so no invoice could be issued right away. After placing an order, customers received a voucher which they had to pay in cash at a physical store. PayPal would create an order only if payment was successful.

Dealing with different payment methods with distinct processes, we needed to find another way to more accurately report traffic sources and revenues.

Our Approach

Although PayPal would create an order only after a successful payment, OXXO and Andyen would create an order without it, resulting in many canceled orders getting included in the GA report. And as previously mentioned, waiting for an invoice was not a viable approach.

Hence, we decided to capture information even before an invoice was issued and filter out all canceled orders instead. The decision was made after priorities were aligned with the client, and it was agreed that having a clear view of marketing performance and correct traffic sources was more important than having 100% accuracy of the captured revenues/orders.

The final solution we came up with was this:

  • Send a Google Analytics purchase hit once the order is created in Magento (before payment confirmation is received)
  • Send a refund hit once the order status is updated to “canceled” (i.e., due to timeout or not receiving payment confirmation)

By default, GA will report all placed orders and revenues. And then, those that were refunded (canceled) will have a refund amount equal to the reported revenue amount. This can be seen in the default Sales Performance report in Google Analytics. Unfortunately, GA doesn’t automatically deduct the Refund Amount from the Revenue. Nevertheless, a simple calculation would allow us to get the true orders and revenue figures:

  • Completed Transactions = Transactions – Refunds
  • Received Revenue = Revenue – Refund amount

Still, it is not possible to show such calculated metrics within GA itself. They can be defined, however, in Google Data Studio or any other compatible data visualization platform. 

Results

We applied the calculations, and the numbers we got very closely matched those reported in Magento Admin and the ERP system. We can’t share the exact figures here but for illustration purposes, imagine we got the following:

Day X, Google Analytics Calculated Metrics

  • Received Revenue: $103,300 (103.3% of ERP data; 100.3% of Magento data)
  • Confirmed Orders: 130 (100.8% of ERP data; 100.8% of Magento data)

The ERP system recorded 129 transactions and $100,000 in revenue. As you can see, we got very close to 100% accuracy with the calculated metrics. And in the given scenario, one order could have been placed slightly before or after midnight, which might explain the slight difference.

To satisfy data reporting needs, dashboards could be created in Google Data Studio or another data visualization platform. Such dashboards are useful for traffic sources analysis, campaign analysis, landing page analysis, device analysis, and the like.

If your Google Analytics reports do not match your ERP or eCommerce platform’s reports, you’re likely either excluding important data or capturing data that you’re not supposed to. You can’t make data-informed decisions if your data is not reliable.

Our Digital Analytics Specialists can run an Analytics Health-Check on your eCommerce store to determine if all relevant data to your business is being tracked. If we find issues with your data tracking, we can configure your GA correctly and guide you with the next steps. Book a free consultation today.

Hire eCommerce experts

Get in touch for a free consultation.

Your request will be processed by

If you enjoyed this post, you may also like