Pinned

GTM4WP bug: Android Facebook & Instagram purchases not tracked (fixed in 2.0.6)

PixelFly
PixelFly PixelFly Team

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.

PixelFly log breakdown by browser: Facebook app on Android reached checkout and thank-you pages but sent zero checkout and purchase events 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.

GitHub issue 477 in the GTM4WP repository: WooCommerce data layer is dropped in Android in-app browsers because X-Requested-With is checked for presence, not value The bug report on GitHub (issue #477): the WooCommerce data layer was skipped whenever the X-Requested-With header was present.

What to do

GTM4WP 2.0.6 changelog entry fixing missing WooCommerce data layer in Android in-app browsers such as Facebook and Instagram 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.

  1. In WordPress, go to Plugins and update GTM4WP to 2.0.6 or newer.
  2. Clear your site cache (LiteSpeed Cache, WP Rocket, Cloudflare or whatever you use).
  3. Test it: open your store from the Facebook app on an Android phone, place a test order, and check that the purchase event 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

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.

Reply

0 Replies

No replies yet. Know the answer, or seeing the same thing? Reply below.

Join the discussion

Create a free PixelFly account to reply, ask your own questions, and get an email when someone answers.

We use cookies to enhance your experience, analyze site traffic, and for marketing purposes. By continuing to use our site, you consent to our use of cookies. Learn more