• Hello,
    We use GTM4WP (latest version) on WordPress + WooCommerce. The GTM container. We also use Cloudflare Google Tag Gateway and Complianz Premium (with Consent Mode v2).

    Cloudflare’s own automated script injection (“Set up tag”) is off, because Google requires it off when consent mode is used.

    I configured GTM4WP → Advanced:

    Result (verified in DevTools Network):

    Questions:

    1. Is the Container domain name / Container custom path setting (the “same tag gateway” support added in the changelog) only meant to change the gtm.js loader URL, or is it also supposed to route the downstream GA4/Ads measurement requests (/g/collect) through the same first-party path?
    2. If it only affects the gtm.js loader, is there any GTM4WP setting to also send the measurement requests (collect) first-party through the gateway path?
    3. Or is routing of collect entirely out of GTM4WP’s scope (i.e. handled only by Cloudflare’s injection / Google tag config)?

    I want to confirm whether full first-party measurement is achievable via GTM4WP, or whether GTM4WP only first-parties the script load by design.

    Thank you.

    • This topic was modified 1 month, 3 weeks ago by WP-admin.cz.
Viewing 1 replies (of 1 total)
  • Plugin Author Thomas Geiger

    (@duracelltomi)

    Hi @wpadmi,

    Thanks for the well researched question, and sorry for the wait. You had already worked out most of the answer yourself, so let me confirm it directly.

    To take your three questions in order. The Container domain name and Container custom path settings change the loader URL only, which means where gtm.js is downloaded from. They are not meant to route the /g/collect or Google Ads requests, and they cannot do it, because those URLs are decided at runtime by the Google tag inside your container, which the plugin has no control over. So yes, GTM4WP first parties the script load by design, and what you saw in DevTools is the setting working correctly rather than working only partially.

    The measurement requests themselves are configured in the GTM container. You set server_container_url on the Google tag so that GA4 sends the data to your server side endpoint, or you let Cloudflare’s Tag Gateway handle the injection. As you noted, Google asks you to turn Cloudflare’s automatic injection off when consent mode is used, which leaves the server container URL as the option to use. Either way this is set in GTM, not in the plugin.

    So full first party measurement is possible together with GTM4WP, but not through it. The plugin first parties the loader and the Google tag configuration first parties the data collection. The two complement each other, and your current setup already has the first half done correctly.

Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.