The short answer
To track WooCommerce purchases, install a plugin that pushes order data to the dataLayer (such as GTM4WP), then in GTM create a Custom Event trigger for purchase and tags for GA4 (purchase event with value, currency INR and transaction_id), Google Ads (purchase conversion with value and transaction ID) and Meta (Purchase with value and currency). Test a real order and check the purchase fires once, even if the thank-you page is reloaded.
Before you start
By the end of this SOP
Each paid WooCommerce order appears once in GA4, Google Ads and Meta with the correct order value in INR.
- Time
- 60–90 minutes
- You’ll need
- WordPress admin access, GTM on the site (SOP 004), GA4 through GTM (SOP 009), Google Ads and Meta accounts.
- Who does this
- The person who manages tracking; a developer if the theme is heavily customised.
About this SOP: why it matters, where and when
Why it matters: Value-based bidding, ROAS reporting and purchase audiences all depend on accurate purchase data.
Where: WordPress → Plugins, tagmanager.google.com, GA4, Google Ads and Meta Events Manager.
When: Before running any sales campaign for a WooCommerce store.
Stage 1
Get order data into the dataLayer
- 1
Install and activate a dataLayer plugin such as GTM4WP (GTM for WordPress). Enter your GTM container ID in its settings.
- 2
In the plugin’s Integration → WooCommerce tab, turn on the e-commerce dataLayer (GA4 format).
- 3
If GTM was added another way (Site Kit, theme), set the plugin to not add the container code again, to avoid loading GTM twice.
Watch out
Two GTM installs send every event twice and double your purchases.
- 4
Place a test order (a ₹1 test product or a coupon). On the thank-you page, open GTM Preview and check a purchase event with ecommerce.value, ecommerce.currency and ecommerce.transaction_id.
Stage 2
Create variables and the trigger in GTM
- 1
Variables → New → Data Layer Variable: ecommerce.value, ecommerce.currency and ecommerce.transaction_id (Data Layer Version 2).
- 2
Triggers → New → Custom Event, event name purchase. Name it “CE – purchase”.
Stage 3
Add the purchase tags
- 1
GA4: GA4 Event tag, event name purchase, tick “Send Ecommerce data” from the Data Layer, trigger “CE – purchase”.
- 2
Google Ads: create a Purchase conversion action (count: Every, value: use different values), then a Google Ads Conversion Tracking tag with its ID and label, conversion value {{ecommerce.value}}, transaction ID {{ecommerce.transaction_id}}, currency {{ecommerce.currency}}.
- 3
Meta: send Purchase with value and currency, plus event_id = transaction ID so the Conversions API copy can be deduplicated.
- 4
Make sure the Conversion Linker tag fires on all pages.
Stage 4
Test, including reloads, then publish
- 1
Place a second test order. In Preview, check each tag fires once with the correct value.
- 2
Reload the thank-you page. Most dataLayer plugins don’t push the order again; if the tags fire again, Google Ads still dedupes by transaction ID, but fix GA4 and Meta by firing only once per order.
- 3
Publish the container. Check GA4 Realtime or DebugView, Google Ads conversion status, and Meta Test Events.
- 4
After a week, compare purchases in GA4 and Google Ads with WooCommerce orders. A gap of more than 10–15% needs investigation.
Practice & check
Now do it for real
Reading is not doing. Open your own account and complete this task before you move on.
Practice task (5 min)
On a staging WooCommerce store, set up purchase tracking and show a test order with the same value and transaction ID in GA4 DebugView and GTM Preview.
Prove it
Two questions. Get both right and this SOP is done.
Common questions
Can I use Google’s WooCommerce plugin instead of GTM?
Yes. Google Listings & Ads and Site Kit can send purchases, but mixing a plugin and GTM for the same event causes duplicates. Choose one method per platform.
Should I include shipping and tax in the purchase value?
For ROAS, many stores send product revenue without tax and shipping. Whatever you choose, use the same rule everywhere and note it in reports.
How do I handle refunds and COD refusals?
Ad platforms keep the original purchase. Track refusals in WooCommerce or your CRM and report real revenue separately; for Google Ads you can also upload conversion adjustments.
Done. That’s a real skill, not a certificate.
Next: SOP 310 — Exclude Office, Staff and Test Visits from GA4 →
Want to do this on real client budgets, with a mentor checking your work? That’s Level 2 at Unlearn. See the Digital Marketing track