Skip to Main Content
Ecommerce payment card

Google eCommerce Tracking with the WorldPay Payment Gateway

There has long been an issue with tracking ecommerce transactions with Google Analytics when using the Worldpay hosted payment pages.

A hosted payment page is where customers on your ecommerce website are directed to a third party payment provider to complete their checkout. This is usually recommended to avoid the additional liabilities imposed by PCI compliance, but it can cause problems such as breaking the overall user experience that customers have when using your site.

In the case of using Worldpay, another problem caused is the inability to add Google Analytics tracking code into the call back page. The call back page is essentially the customer confirmation page visitors see once their transaction has been approved. Most payment providers will direct customers back to your site to show the confirmation page, however Worldpay basically 'sucks in' a page from your site into their own hosted success page. These custom pages are unable to contain any javascript due to the risk of cross site scripting (XSS) attacks.

If you're using the Worldpay gateway, your only choice at the moment it would seem would be change payment providers.

Andrew Armitage, A Digital

While this in itself is no bad thing and a sensible approach to take, it means that any tracking codes added for Google Analytics (or even other tracking platforms) will be removed before the page is displayed to the customer. The end result is that none of your transactions completed through the Worldpay gateway will be recorded in analytics.

This is a problem for adwords advertisers as it makes it impossible to identify which transactions came from which ad.

As of the time of writing, Worldpay are planning to add this functionality into a future release of their hosted payment pages, but given that other articles on the web have referenced this for almost 2 years, it doesn't look like this functionality will be available any time soon.

This is one of the most important aspects of an ecommerce website; being able to track sales, transactions and track them back to either email campaigns or paid search links. If you're using the Worldpay gateway, your only choice at the moment it would seem would be change payment providers.

If you'd like any guidance on payment providers, or are wondering what sort of sales tracking your ecommerce site might be missing out on, please get in touch for a no-obligation chat about your site.