Title: GlobalDev Server Tracking for Google
Author: Globaldev
Published: <strong>November 23, 2026</strong>
Last modified: November 23, 2026

---

Search plugins

![](https://ps.w.org/globaldev-server-tracking-for-google/assets/banner-772x250.
png?rev=3818491)

![](https://ps.w.org/globaldev-server-tracking-for-google/assets/icon-256x256.png?
rev=3818491)

# GlobalDev Server Tracking for Google

 By [Globaldev](https://profiles.wordpress.org/globaldevitus/)

[Download](https://downloads.wordpress.org/plugin/globaldev-server-tracking-for-google.2.7.0.zip)

 * [Details](https://wordpress.org/plugins/globaldev-server-tracking-for-google/#description)
 * [Reviews](https://wordpress.org/plugins/globaldev-server-tracking-for-google/#reviews)
 *  [Installation](https://wordpress.org/plugins/globaldev-server-tracking-for-google/#installation)
 * [Development](https://wordpress.org/plugins/globaldev-server-tracking-for-google/#developers)

 [Support](https://wordpress.org/support/plugin/globaldev-server-tracking-for-google/)

## Description

GlobalDev Server Tracking for Google connects a WordPress website to the owner’s
own Google Analytics 4 (GA4) web stream and optional Google Ads conversion action.
It is independently developed and is not affiliated with or endorsed by Google LLC.
It does not include a Google account, advertising account, tracking ID, API secret,
or hosted GlobalDev tracking service.

 * Load the Google tag only after the visitor explicitly grants the relevant statistics
   or marketing consent (Google Basic Consent Mode v2). No external Google requests
   are initiated by this plugin before opt-in.
 * Send GA4 page views, product views, cart and checkout actions, and optional engagement
   events from the visitor’s browser after statistics consent.
 * Send GA4 purchase and refund events from WooCommerce through Google’s Measurement
   Protocol, after consent was recorded for the order. Requires a valid GA4 Measurement
   ID, Measurement Protocol API secret, and browser client ID.
 * Send optional Google Ads purchase conversions from the WooCommerce thank-you 
   page after marketing consent. This is browser-side Google Ads tracking, not server-
   side Google Ads API uploads.
 * View locally stored purchase/refund delivery attempts and optional diagnostic
   HTTP status codes in the WordPress administration area. Google receiving a request
   does not guarantee processing or attribution.
 * Customize tracked links, form submissions, file downloads, scrolling, HTML5 video
   engagement, and up to 20 custom CSS click rules. Forms do not submit their field
   contents to this plugin.

### Consent requirements

**No tracking without visitor opt-in.** The plugin’s front-end JavaScript and WooCommerce
server hooks require consent. The plugin does not install or manage a consent banner.
The administrator cannot override these visitor consent requirements. Do not run
another plugin or manually installed tag for the same Google property without checking
for duplicates.

The following CMP interfaces are supported:

 * WordPress Consent API: JavaScript `wp_has_consent('statistics')` and `wp_has_consent('
   marketing')`, with its consent-change callback; the server-side Consent API is
   supported where implemented by the CMP.
 * Standard Google Consent Mode v2 `gtag('consent', 'update', { analytics_storage:'
   granted', ad_storage: 'granted', ad_user_data: 'granted' })` messages in the 
   site’s dataLayer. Consent can be denied or withdrawn independently for analytics
   and advertising. A CMP may grant only one category.
 * A documented custom integration: after genuine visitor choice, set `window.gdgtConsentGranted`
   and/or `window.gdgtMarketingConsentGranted` to boolean values and dispatch `window.
   dispatchEvent(new Event('gdgt-consent-changed'))`.

CookieYes and other CMPs can use their WordPress Consent API and/or Google Consent
Mode integrations. Check that the chosen CMP actually emits one of these signals:
merely installing a cookie banner or the WordPress Consent API plugin does not grant
consent. A GlobalDev consent marker cookie is written **only after consent** to 
make the visitor’s choice available to WooCommerce server-side hooks. Do not manually
set the marker to bypass consent.

On withdrawal, the plugin stops dispatching events and revokes its consent signals;
its own consent and client/session marker cookies are cleared. A Google tag already
loaded on that page cannot be unloaded, and cookies created by other plugins/CMPs
must be managed by those providers. For a clean test use a fresh private browser
window and reject the CMP banner.

### External services

This plugin uses Google’s services exclusively when the site owner enters their 
own Google identifiers and the visitor grants the corresponding consent. It does
not send information to GlobalDev servers and does not track the WordPress dashboard.

**1. Google tag (gtag.js) — Google LLC**

 * What it does: loads JavaScript from `https://www.googletagmanager.com/gtag/js?
   id=...` and dispatches permitted GA4 website events and, when configured, Google
   Ads conversion events to Google.
 * When it is used: **only after** a valid statistics consent signal (for GA4) or
   marketing consent signal (for Ads). It is not loaded or contacted by this plugin
   without that consent. Permission for Ads is independent of GA4 statistics consent.
 * Data transmitted: the tag request includes the configured measurement/tag ID 
   and ordinary HTTP request metadata (which may include the visitor IP address 
   and user agent). After analytics consent, events may contain page URL/title/referrer,
   search term, product name/SKU/category, product quantity/price, basket value/
   currency, interaction/event identifiers, selected checkout-step category, and
   a browser client/session identifier. After marketing consent, Google Ads purchase
   events may contain the conversion ID/label, order number, order total, and currency.
   Google’s tag may set or read Google Analytics/Ads cookies according to the visitor’s
   consent and Google settings. The plugin does **not** send checkout form content,
   order email, customer name, billing address, or telephone number to Google.
 * Privacy: https://policies.google.com/privacy
 * Google Analytics terms: https://marketingplatform.google.com/about/analytics/
   terms/us/
 * Google Ads terms: https://payments.google.com/payments/apis-secure/get_legal_document?
   ldi=351848

**2. Google Analytics Measurement Protocol (GA4) — Google LLC**

 * What it does: submits paid WooCommerce purchases and refunds to Google’s GA4 
   API using a secret held in WordPress options; used only in Hybrid mode with the
   merchant’s own API secret.
 * Where: `https://region1.google-analytics.com/mp/collect` by default, or `https://
   www.google-analytics.com/mp/collect` when the EU endpoint option is disabled.
   The Measurement ID and API secret appear in the server-to-server request URL;
   the API secret is never exposed to browser visitors.
 * When it is used: on qualifying order payment/processing/completion and refunds,**
   only if** statistics consent was recorded during checkout, together with the 
   analytics client ID. A refund event is linked to the previously consented order.
   Unconsented orders are not sent.
 * Data transmitted: browser client ID and optional GA4 session ID, event type, 
   WooCommerce transaction/order number, item names/IDs, quantities, prices, value,
   shipping, tax, currency and applied coupon codes. The server HTTP connection 
   exposes the site’s server IP address and normal request metadata to Google. Customer
   names, addresses, emails, telephone numbers and WordPress login details are not
   included.
 * Privacy: https://policies.google.com/privacy
 * Google Analytics terms: https://marketingplatform.google.com/about/analytics/
   terms/us/

Your use of these services is governed by the applicable Google terms and your privacy
policy. Inform visitors of tracking and your retention practices before enabling
the plugin on a live site.

### Privacy

The plugin stores its settings in WordPress options, including the administrator-
supplied server-side Google API secret. For consented orders, WooCommerce order 
metadata may hold the visitor’s analytics client/session ID, a consent indicator
and purchase/refund send status. A custom database table stores order number/ID,
transaction ID, amount, currency, destination, status and timestamps for conversion
diagnostics. Optional diagnostics store at most 100 event names/status/HTTP codes.
Website administrators are responsible for retention, access control and deletion
consistent with their privacy policy.

## Installation

 1. Install and activate this plugin on WordPress 6.2 or newer. WooCommerce is optional,
    but required for ecommerce purchase and refund hooks.
 2. Open **WooCommerce > Server Tracking for Google** (or **Settings > GlobalDev Tracking**
    when WooCommerce is not active).
 3. Enter your own GA4 Measurement ID (G-…), and optionally the Google Ads tag ID (
    AW-…) and purchase conversion label. Create a Google Analytics Measurement Protocol
    API secret to enable server-side ecommerce purchases and refunds.
 4. Select **Hybrid** (browser engagement and server-side order events) or **Browser
    only**. Previously saved ‘server’ mode settings behave like Hybrid; the unauthenticated
    public event relay has been removed for security.
 5. Configure a consent management platform (CMP), and make sure it reports **statistics**
    and, if using Google Ads, **marketing** consent. Confirm that neither Google tag
    nor any Google request is present before consent.
 6. Save, accept the relevant cookies on a test browser, then test the tracking with
    Google Tag Assistant and GA4 Realtime/DebugView. Perform a paid test order for 
    ecommerce. A paid order alone is not proof of an attributed Ads conversion.

## FAQ

### Does the plugin contact Google before consent?

No. Only the locally enqueued tracking.js runs before consent, and it does not create
a Google tag or perform an external request until the CMP reports explicit statistics
or marketing permission. This is Basic Consent Mode, not Advanced Mode with cookieless
pings.

### Does the server mode send every event through the server?

No. Starting in 2.7.0, the insecure public event relay has been removed. Hybrid 
mode sends engagement events in the browser and consented WooCommerce purchase/refund
events server-side. Old ‘server’ settings are interpreted as Hybrid. This removes
an endpoint that could be abused to inject events using your GA4 API secret.

### Why is there no GA4 event after accepting cookies?

The CMP must actively signal consent using one of the documented interfaces. Test
your analytics permission, then confirm `window.gdgtTrackingStatus` shows `analyticsConsent:
true`. A cookie banner’s mere presence is not proof of consent.

### Can I use the plugin without WooCommerce?

Yes, for page-view and engagement tracking. Ecommerce purchase/refund events require
WooCommerce.

### How are duplicate purchases prevented?

Server-side GA4 purchases use WooCommerce order metadata and stable transaction 
IDs; browser thank-you conversions use session-scoped keys. Independent tags from
other plugins or Google Tag Manager cannot be automatically deduplicated by this
plugin.

## Reviews

There are no reviews for this plugin.

## Contributors & Developers

“GlobalDev Server Tracking for Google” is open source software. The following people
have contributed to this plugin.

Contributors

 *   [ Globaldev ](https://profiles.wordpress.org/globaldevitus/)

[Translate “GlobalDev Server Tracking for Google” into your language.](https://translate.wordpress.org/projects/wp-plugins/globaldev-server-tracking-for-google)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/globaldev-server-tracking-for-google/),
check out the [SVN repository](https://plugins.svn.wordpress.org/globaldev-server-tracking-for-google/),
or subscribe to the [development log](https://plugins.trac.wordpress.org/log/globaldev-server-tracking-for-google/)
by [RSS](https://plugins.trac.wordpress.org/log/globaldev-server-tracking-for-google/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

#### 2.7.0

 * Rename to GlobalDev Server Tracking for Google, with matching directory slug 
   and text domain, to clarify unaffiliated Google integration.
 * Enforce per-visitor analytics/marketing opt-in; load Google JavaScript dynamically
   only after permission, with denied-by-default Consent Mode v2.
 * Remove the unauthenticated public Measurement Protocol event relay and preserve
   server-side WooCommerce purchases/refunds.
 * Attach WooCommerce event payloads with WordPress wp_add_inline_script() rather
   than raw script tags.
 * Expand installation guidance and explicit disclosures for Google Tag, Google 
   Ads and GA4 Measurement Protocol; correct contributor username.

#### 2.6.2

 * Specify WordPress-enqueued script versions for the Google tag.

## Meta

 *  Version **2.7.0**
 *  Last updated **55 minutes ago**
 *  Active installations **Fewer than 10**
 *  WordPress version ** 6.2 or higher **
 *  Tested up to **7.1.5**
 *  PHP version ** 7.4 or higher **
 * Tags
 * [analytics](https://wordpress.org/plugins/tags/analytics/)[conversion tracking](https://wordpress.org/plugins/tags/conversion-tracking/)
   [google ads](https://wordpress.org/plugins/tags/google-ads/)[google analytics](https://wordpress.org/plugins/tags/google-analytics/)
   [woocommerce](https://wordpress.org/plugins/tags/woocommerce/)
 *  [Advanced View](https://wordpress.org/plugins/globaldev-server-tracking-for-google/advanced/)

## Ratings

No reviews have been submitted yet.

[Your review](https://wordpress.org/support/plugin/globaldev-server-tracking-for-google/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/globaldev-server-tracking-for-google/reviews/)

## Contributors

 *   [ Globaldev ](https://profiles.wordpress.org/globaldevitus/)

## Support

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/globaldev-server-tracking-for-google/)