I’m trying to set up Google Tag Gateway with Google Tag Manager. Google’s documentation says I must create a path on the same domain (e.g., yourdomain.com/gtg/) for the reverse proxy and not a subdomain.
Can anyone here tell me how they created that path on Shopify (where we have no direct server-level CDN control) or if it’s possible at all with the basic plan? If not, is there an official way to set up Google Tag Gateway or not really?
Setting up a Google Tag Gateway path (like yourdomain.com/gtg/) using a reverse proxy directly on a basic Shopify plan is generally not possible because Shopify does not give merchants direct access to the server-level CDN or web server configuration needed to implement a reverse proxy on a path. Shopify limits direct server control, and they specifically warn against using third-party proxies like Cloudflare’s proxied mode for your store’s primary domain as it can cause issues. The official and supported way to connect Google services like GTM and Google Analytics is typically through the Google & YouTube app or by manually implementing the GTM snippet in your theme’s theme.liquid file. For server-side tagging, which the Google Tag Gateway enables, the common workaround for Shopify users who are not on a Shopify Plus plan (which allows for more custom checkout scripts) is to use a third-party service or app that specializes in server-side tracking, often utilizing a subdomain (e.g., gtm.yourdomain) as the tagging server URL, as EZPassKY login setting up a sub-path is restricted.
Thank you very much for the detailed explanation! I already set up GTM but I just saw this “new” Gateway product which seems to lead to more accurate analytics. All good, I’ll just keep the standard setup.
Shopify doesn’t allow for custom reverse-proxy paths such as /gtg/, so Google Tag Gateway can’t be implemented natively on the home plan. The hack is to run GTM through server-side tagging on an external proxy, or via a dedicated tagging service, then connect Shopify on the client via triggers and webhooks.