Back to Community

Troubleshooting the gtm4wp.orderCompletedEEC Event Not Firing in WordPress

Content

The gtm4wp.orderCompletedEEC event is crucial for tracking completed purchases and revenue in Google Analytics via the GTM4WP plugin. A common issue reported by many users is that this event fails to fire, leading to missing transaction data. Based on community reports, here are the most frequent causes and their solutions.

Why the gtm4wp.orderCompletedEEC Event Might Not Fire

The event is designed to trigger when a customer lands on the WooCommerce order received/thank you page (/checkout/order-received/). If this page is not loaded correctly, or if its workflow is interrupted, the event will not push data to the dataLayer. Common causes include:

  • Custom or Redirected Thank You Pages: Plugins that customize the checkout process or replace the default thank you page (e.g., WooFunnels, CheckoutWC, payment gateway plugins) often break the standard hook that fires the event.
  • Off-Site Payment Gateways: Gateways like PayPal or Adyen that take the user off-site for payment. If the customer does not return to the standard order received page, the event cannot fire.
  • Plugin Conflicts: Conflicts with other plugins, particularly those related to GDPR/cookie consent, checkout optimization, or caching, can prevent the event from firing.
  • Incorrect WooCommerce Page Setup: Having the same page set for both the Cart and Checkout in WooCommerce settings can cause unexpected behavior.
  • Theme or Custom Code Issues: Some themes may override standard WooCommerce templates, removing necessary functionality.

How to Troubleshoot and Fix the Issue

1. Test and Identify the Cause

First, place a test order using a payment method that does not redirect off-site (like "Direct Bank Transfer"). If the event fires with this method but not with others (like PayPal), the issue is likely related to the payment gateway's redirect flow.

2. Check for a Custom Thank You Page

Many issues arise from plugins that change the thank you page. The URL of your thank you page should look like this:

/checkout/order-received/123/?key=wc_order_abc123

If it looks different (e.g., /order-received/?order=83426), a plugin is altering it. Temporarily disable any checkout optimization, funnel, or thank you page redirect plugins to see if the event starts working.

3. Verify Payment Gateway Integration

For off-site gateways, the customer must be returned to the standard WooCommerce order received page for the event to fire. Check the settings in your payment gateway plugin to ensure the "Return URL" is configured correctly. There is no native way for the event to fire if the user never returns to your site.

4. Investigate Plugin Conflicts

A conflict with another plugin is a common cause. As mentioned in the threads, GDPR plugins have been known to cause this issue. Perform a full conflict test:

  1. Disable all plugins except WooCommerce and GTM4WP.
  2. Switch to a default WordPress theme (like Storefront or Twenty Twenty-One).
  3. Test the checkout process. If the event fires, reactivate your plugins and theme one by one to identify the culprit.

5. Review WooCommerce Settings

In your WordPress admin, go to WooCommerce > Settings > Advanced > Page setup. Ensure that the "Cart" page and "Checkout" page are assigned to two different pages. Having the same page for both can prevent the event from firing.

6. Check the GTM4WP "Integration" Settings

Within the GTM4WP settings, go to the Integration > WooCommerce section. Ensure that "Enhanced Ecommerce" is enabled. Some users have also reported that checking the "Do not flag orders as being tracked" option in newer versions of the plugin has resolved their issue, especially when using optimized checkout plugins.

When to Seek Further Help

If these steps do not resolve the issue, the problem may require custom code to trigger the event manually or to work around a specific plugin conflict. The GTM4WP – A Google Tag Manager (GTM) plugin for WordPress team suggests reviewing the official setup guide for enhanced ecommerce to ensure your Google Tag Manager container is configured correctly. Community support forums can also be a valuable resource for finding workarounds that other users have developed for specific plugins and themes.

Related Support Threads Support