Search code examples
google-tag-managergoogle-analytics-4

What is the main use case for 'Live' environments' Google Tag Manager snippet?


Google Tag Manager article about environments mentions:

Note: Every container is set up with a "Live" environment by default, which always points to the container version that is currently published. You don't need to define the Live environment.

But what is the intended use case for Live environment's dedicated GTM snippet, that can be obtained via: "Admin" > "Environments" > "Live" > "Actions" > "Get Snippet", is unclear

If you use "Live" environment's GTM snippet on your production site - gtm_auth & env parameters values are shared publically. We've used 'default' GTM snippet, which can be obtained by "Admin" > "Install Google Tag Manager", for your production environment and it works perfect.

So the question is how one benefits from using "Live" GTM snippet?


Solution

  • No benefit really.

    When you get the live GTM snippet, you get the environment params populated as you do for any other environment.

    When you use the "Install GTM" snippet, it skips the env-specific parameters because when the env parameters are skipped, GTM defaults to loading the live env. Specifying the live env doesn't really bring any benefit since I don't think you can change which environment is live. So env-2 will always be live. I'm trying to confirm the last part just out of curiosity. You'd think they would preserve env-1 for the main live env, but no.