Trackify — GA4 Conversion Tracking for WooCommerce

Descripció

The only GA4 plugin that tracks where your profit actually comes from — not just your revenue.

Connect your WooCommerce store to Google Analytics 4 in under two minutes. Every sale, every product view, every checkout step, and every abandoned cart is tracked automatically using GA4’s full eCommerce event schema. No Google Tag Manager. No data layers. No developer needed.

Most WooCommerce stores running Google Analytics only see revenue. This plugin goes further — it records the traffic source that generated each order and saves your Cost of Goods so you can see which marketing channel is actually profitable, not just busy.

🔍 Who This Plugin Is For

You run a WooCommerce store and at least one of these is true:

  • You spend money on Google Ads, Facebook, or email campaigns and cannot tell which one is making you money
  • Your Google Analytics shows sessions but your purchase numbers do not match WooCommerce
  • You tried setting up GA4 tracking before and gave up because it required a developer or Tag Manager
  • You want to know which products people view but never buy — and fix the gap
  • You need GDPR-compliant analytics that works with your cookie consent plugin

🛒 Every WooCommerce Event. Tracked Automatically.

All 15 GA4 eCommerce events fire without any configuration beyond your Measurement ID:

Shopping Funnel
* view_item_list — Product grids, shop pages, category pages
* view_item — Individual product pages (including variable product variant changes)
* select_item — When a shopper clicks a product from a list
* add_to_cart — Every add to cart action across the store
* remove_from_cart — Item removals from the cart
* view_cart — Cart page views with full item data
* begin_checkout — Checkout page entry

Checkout Funnel
* add_shipping_info — When a shipping method is selected
* add_payment_info — When a payment method is selected
* purchase — Order completion with transaction ID, revenue, tax, shipping, coupon, payment method, and new vs returning customer flag

Beyond the Funnel
* refund — Automatic refund tracking when you process a refund in WooCommerce
* view_search_results — What your customers are searching for on-site
* exception — 404 errors that are costing you traffic
* login and sign_up — Account activity tracking
* coupon_applied and coupon_removed — Promotional usage

📡 Server-Side Purchase Tracking

Browser-based tracking fails silently in Safari, Firefox, and any browser with an ad blocker installed — which is now more than 40% of your visitors on desktop.

This plugin sends a duplicate purchase event directly from your server to GA4 using the Measurement Protocol API. If the browser fires, great. If it does not, the server catches it. Your conversion data stays accurate regardless of what the customer’s browser does.

Deduplication is handled automatically — GA4 will never count the same order twice.

💰 Cost of Goods & Profit Tracking

Add your product cost to any WooCommerce product and we send a profit custom metric with every server-side purchase event. In Google Analytics, you can create a custom metric to see true margin alongside revenue — something no WooCommerce report gives you out of the box.

The profit formula: Revenue − COGS − Shipping Cost − Tax

📊 Built-In Analytics Dashboard (No GA4 API Required)

The plugin includes a WooCommerce analytics dashboard that runs entirely on your own order data — no Google Cloud project, no OAuth, no service account JSON file needed.

Overview tab — Revenue, orders, average order value, and refund rate for any date range

Products tab — Every product ranked by units sold and revenue over the last 365 days. When GA4 Data API credentials are optionally configured, adds views, sessions, bounce rate, and conversion rate per product.

Customers tab — Top customers by lifetime spend, order frequency, average order value, and last purchase date

Traffic Sources — Revenue and order count grouped by UTM source and medium, built from the first-touch attribution data saved to each order

🎯 First-Touch UTM Attribution on Every Order

When a customer first arrives on your store via a UTM link or Google Ads click, we save that traffic source permanently — even if they return days later through a direct visit to complete the purchase.

Every order in WooCommerce gets the original utm_source, utm_medium, utm_campaign, and gclid saved to its order meta. This means you can filter your WooCommerce orders by traffic source and see exactly which campaigns are generating paying customers, not just sessions.

🔒 Consent Mode V2 — GDPR Ready

Tracking defaults to denied until consent is given, which is the correct behaviour for EU stores under GDPR. The plugin implements Google Consent Mode V2 with all four consent signals:

  • analytics_storage
  • ad_storage
  • ad_user_data
  • ad_personalization

CookieYes is detected automatically. The plugin listens for the cookieyes_consent_update event and updates all consent signals in real time — no plugin configuration required.

Also integrates with the WP Consent API standard for compatibility with other consent plugins.

🧩 Google Tag Manager Support

Already using GTM? Set your GTM Container ID and disable the base GA4 code. The plugin will load GTM in the head, inject the noscript body tag, and still push all eCommerce data to the dataLayer for your GTM tags to consume.

Using both? That works too — set your GA4 Measurement ID for direct tracking and your GTM ID for tag management side by side.

⚙️ Advanced Features

Subscription Tracking — Works with WooCommerce Subscriptions. Tracks subscription_started, subscription_cancelled, and subscription_expired status changes.

Email Link Tracking — All links in WooCommerce transactional emails are automatically tagged with utm_source=email so customers who click through from an order confirmation are attributed correctly in GA4.

New vs Returning Customer Detection — Every purchase event includes a new_customer parameter so you can segment first-time buyers from returning customers directly in GA4.

Debug Mode — Enable GA4 DebugView to see every event firing in real time while you test, without affecting your live data.

Revenue Logic — Choose between gross revenue (total including tax and shipping) or net revenue (subtotal only) for your GA4 conversion value.

Product Identifier — Send products to GA4 using their WooCommerce product ID or SKU, depending on how your GA4 reports are set up.

Optimizer-Safe Scripts — Tracking scripts are marked with data-no-optimize and data-cfasync="false" so caching plugins and Cloudflare do not defer or combine them.

HPOS Compatible — Fully supports WooCommerce High-Performance Order Storage (custom order tables). All database queries use the correct table depending on your WooCommerce configuration.

WooCommerce Blocks Compatible — Works with the Cart and Checkout blocks via the WooCommerce Store API. No classic shortcode required.

External Services

This plugin sends data to the following third-party services. You must create your own account with each service. No account is created automatically.

1. Google Analytics 4 (Required for tracking)
* Purpose: Records eCommerce events, purchase conversions, and traffic data
* Data sent: Page URL, product names and IDs, transaction values, currency, tax, shipping, and optionally hashed email and phone for Enhanced Conversions
* Scripts loaded from: www.googletagmanager.com, www.google-analytics.com
* Terms of Service: https://marketingplatform.google.com/about/analytics/terms/us/
* Privacy Policy: https://policies.google.com/privacy

2. GA4 Measurement Protocol (Required for server-side tracking)
* Purpose: Sends purchase and refund events directly from your server as a reliability fallback
* Data sent: Client ID, transaction ID, revenue, items, and user ID (if logged in)
* Endpoint: https://www.google-analytics.com/mp/collect
* Terms of Service: https://marketingplatform.google.com/about/analytics/terms/us/

3. Google Tag Manager (Optional)
* Purpose: Tag management if you prefer to manage GA4 through GTM
* Data sent: Standard web request headers. No business data unless you configure it in GTM.
* Scripts loaded from: www.googletagmanager.com
* Terms of Service: https://marketingplatform.google.com/about/analytics/tag-manager/use-policy/
* Privacy Policy: https://policies.google.com/privacy

Instal·lació

From WordPress.org (Recommended)

  1. Go to Plugins Add New Plugin
  2. Search for WooCommerce Google Analytics 4
  3. Click Install Now, then Activate
  4. Go to WooCommerce Settings Integration Google Analytics Tracking
  5. Paste your Measurement ID (starts with G-) and click Save changes

Manual Installation

  1. Download the plugin ZIP from WordPress.org
  2. Go to Plugins Add New Plugin Upload Plugin
  3. Upload the ZIP file and activate
  4. Complete step 4 and 5 above

How to find your GA4 Measurement ID

  1. Go to analytics.google.com
  2. Click Admin (bottom left gear icon)
  3. Click Data Streams under your property
  4. Click your website stream
  5. Copy the Measurement ID — it starts with G-

To enable server-side purchase tracking (Recommended)

  1. In GA4, go to Admin Data Streams your stream Measurement Protocol API Secrets
  2. Click Create and copy the secret value
  3. Paste it into GA4 API Secret in the plugin settings

PMF

Does this plugin work without Google Tag Manager?

Yes, completely. Paste your GA4 Measurement ID and the plugin handles everything. GTM is entirely optional and only needed if you already use it for other tags.

How is this different from WooCommerce’s built-in analytics?

WooCommerce Analytics shows you revenue inside WordPress using your own order data. This plugin sends your eCommerce data to Google Analytics 4 so you can combine it with your full traffic picture — organic search, ad campaigns, social media, email — and see which channels actually drive paying customers.

Will it slow down my store?

No. The GA4 script loads asynchronously from Google’s CDN and does not block page rendering. Server-side API calls for purchase and refund events run in the background using WooCommerce Action Scheduler, completely separate from the checkout process.

Why are my GA4 sales lower than my WooCommerce orders?

Ad blockers and privacy-focused browsers (Safari, Firefox) block the browser-side tracking script. Enable the GA4 API Secret in settings to activate server-side tracking, which captures purchases that the browser missed. Enabling both browser and server tracking typically brings discrepancy under 5%.

Does it work with WooCommerce Blocks checkout?

Yes. The plugin is compatible with the WooCommerce Blocks Cart and Checkout via the WooCommerce Store API. It registers eCommerce data through the store API data extension system.

Does it track subscription renewals?

Yes, if you use WooCommerce Subscriptions. Status changes (active, cancelled, expired) are tracked automatically.

How does GDPR compliance work?

The plugin implements Google Consent Mode V2. By default, all tracking consent signals are set to denied — no data is sent to Google until the visitor accepts cookies. If you use CookieYes, consent updates are detected automatically. For other cookie consent plugins, use the WP Consent API or set Default Consent to Granted in settings if your legal setup permits.

Can I exclude my own visits from being tracked?

Yes. Enable Exclude Admin Tracking in the Advanced settings. This excludes users with the Administrator or Shop Manager role.

Do I need coding knowledge?

No. The entire setup is a single copy-paste of your GA4 Measurement ID. Every event fires automatically.

Does it support variable products?

Yes. When a customer selects a variant on a product page, a view_item event fires with the specific variation price and attributes.

Can I use my Product SKU instead of Product ID?

Yes. Under Advanced Options, switch Product Identity from ID to SKU. SKUs will be used as item_id in all GA4 events.

What happens when I issue a refund?

When you refund an order in WooCommerce, a refund event is automatically sent to GA4 via the Measurement Protocol API. This requires your GA4 API Secret to be configured.

Ressenyes

No hi ha ressenyes per a este complement.

Col·laboradors i desenvolupadors

«Trackify — GA4 Conversion Tracking for WooCommerce» és programari de codi obert. La següent gent ha col·laborat en este complement.

Col·laboradors

Registre de canvis

0.4

  • Improvement: Rewrote dashboard with tabbed interface covering overview, products, and customers
  • Improvement: Added first-touch UTM attribution saved to order meta for all orders
  • Improvement: HPOS-compatible traffic source queries with automatic table detection
  • Improvement: Added server-side purchase deduplication to prevent double-counting
  • Improvement: Added new vs returning customer detection on purchase events
  • Improvement: Coupon applied and removed events on cart and checkout pages
  • Improvement: Add shipping info and add payment info events on checkout
  • Improvement: Payment failure events with error description sent to GA4
  • Improvement: Cart time-on-page tracking before abandonment
  • Improvement: Product image and GTIN support in GA4 item data
  • Improvement: Hierarchical category tracking (up to 5 levels) in GA4 item data
  • Improvement: Brand taxonomy detection with fallback to site name
  • Improvement: Replaced all direct script tags with wp_add_inline_script
  • Improvement: Updated prefix from gia_ to giawc_ throughout for namespace compliance
  • Improvement: Removed Meta and TikTok tracking to focus solely on Google ecosystem

0.3

  • Improvement: Updated all prefixes from gia_ to giawc_ for WordPress.org compliance.
  • Improvement: Replaced direct script tags with proper WordPress enqueuing functions.
  • Improvement: Enhanced PHPCS compliance with proper nonce verification and code standards.
  • Improvement: Optimized database queries for better performance and HPOS compatibility.
  • Improvement: Improved admin settings interface with better organization.
  • Fix: Eliminated N+1 query problems in profit tracking module.
  • Removed: Meta (Facebook) and TikTok tracking code to focus solely on Google Analytics.

0.2

  • Fix: PHP Fatal error in settings API method compatibility
  • Improvement: Code standards compliance updates

0.1

  • Initial release