Product Icon

Google for WooCommerce

Trending
Promote your products across Google — from Search to YouTube and beyond — so you can reach the right customers to make the most of your peak season.

Add Support for Server-Side Tracking / First-Party Gateways (transport_url filter)

Hello,

Currently, the Google for WooCommerce plugin is structurally incompatible with First-Party Tag Gateways (such as Cloudflare Google Tag Gateway) or Google Tag Manager Server-Side Containers.

As agencies and merchants move toward Server-Side tracking to combat ad blockers and ITP (as officially recommended by Google), the lack of Gateway routing support in this plugin causes critical data corruption (duplicate conversions).

The Technical Bottleneck:
In src/Google/GlobalSiteTag.php, the base configuration string is strictly hardcoded within the get_gtag_config() method:

===============
protected function get_gtag_config( string $ads_conversion_id ) {
return sprintf(
‘gtag(“config”, “%1$s”, { “groups”: “GLA”, “send_page_view”: false });’,
esc_js( $ads_conversion_id )
);
}
================

Because there is no apply_filters() hook wrapped around this return statement, developers are completely locked out from injecting the transport_url or server_container_url parameters required by Google to route tracking through a custom first-party domain.

The Impact (Double-Firing):
When a merchant uses a First-Party Tag Gateway, the gateway intercepts the main gtag script (Chain 1). However, because the base config lacks the transport_url parameter, the plugin’s inline scripts and companion pixels (like 1p-conversion) bypass the gateway entirely and fallback to hitting googleadservices.com directly (Chain 2).

This results in two completely separate initiator chains firing simultaneously for every single order, artificially inflating ROAS and double-counting conversions.

The Proposed Solution:
To make this plugin viable for enterprise and advanced agency setups, please consider one of the following implementations:

1) Quick Fix (Developer Hook): Wrap the return in get_gtag_config() with a WordPress filter (e.g., apply_filters( ‘woocommerce_gla_gtag_config_params’, … )) so developers can natively append “transport_url”: “https://example.com/gateway/” to the config array.

2) Native UI Feature: Add a text field in the plugin settings for “Server-Side Container URL / Gateway Path”, which automatically appends the transport_url parameter to the global gtag config.

Adding this small feature would instantly make the plugin fully compatible with modern Server-Side tracking architectures.

Thanks,
HV InfoTech

Author

hvinfotech

Current Status

Open

Last updated: February 24, 2026

0 comments

Log in to comment on this feature request.