GTM4WP bug: Android Facebook & Instagram purchases not tracked (fixed in 2.0.6)
54 views
Who is affected: WooCommerce stores that use the GTM4WP plugin (Google Tag Manager for WordPress) at any version before 2.0.6.
What happens: When a shopper opens your store inside the Facebook or Instagram app on Android, GTM4WP leaves the checkout and purchase data out of the page. Product views are still tracked, so everything looks normal, but begin_checkout and purchase never fire for these shoppers. Meta, GA4, Google Ads and your server-side tracking all miss those sales.
How big is it: In the store where we found it, every order placed inside the Facebook or Instagram app on Android was missing. That was 27% of all its orders. If most of your ad traffic comes from Facebook and Instagram, your number could be higher.
One day of the store's PixelFly logs, split by browser. Shoppers in the Facebook app on Android reached the checkout and thank-you pages, but not one checkout or purchase event arrived.
Why it happens, in plain words: On Android, the Facebook and Instagram apps add a small label (X-Requested-With) to every page they open. GTM4WP saw that label and decided the page was a background request, so it skipped adding the order data. iPhone shoppers and normal browsers like Chrome don't send that label, so they were never affected. The GTM4WP team confirmed the bug and fixed it in version 2.0.6.
The bug report on GitHub (issue #477): the WooCommerce data layer was skipped whenever the X-Requested-With header was present.
What to do
The GTM4WP 2.0.6 changelog: shoppers in the in-app browser of an Android app such as Facebook or Instagram got no WooCommerce data layer, so their purchase and other e-commerce events were missing.
- In WordPress, go to Plugins and update GTM4WP to 2.0.6 or newer.
- Clear your site cache (LiteSpeed Cache, WP Rocket, Cloudflare or whatever you use).
- Test it: open your store from the Facebook app on an Android phone, place a test order, and check that the
purchaseevent shows up in PixelFly → Event Logs.
A backup for the next bug
Updating fixes this bug, but browser tracking will always have weak spots: ad blockers, closed tabs, payment pages that never send shoppers back. The PixelFly WordPress plugin (1.3.9 and later) also sends every order straight from WooCommerce as a backup. If the browser purchase arrives, PixelFly drops the backup copy, so each order is counted once.
Full write-up with screenshots and how to check your own store: https://pixelfly.io/blog/gtm4wp-android-facebook-instagram-purchases-not-tracked
Sources
- GTM4WP changelog: https://gtm4wp.com/changelog
- GitHub issue #477: https://github.com/duracelltomi/gtm4wp/issues/477
Over to you: Did your purchase count go up after updating? Still missing orders, or not sure which version you have? Reply below and we'll help you check.