As part of unifying Google tag and Google Tag Manager (GTM) platforms, migrated containers manage destinations using explicit tags and triggers in the Tag Manager UI rather than relying on in-page gtag('config') commands. To preserve backward compatibility with existing website code during and after migration, Google Tag Manager provides a “Support gtag('config') initialization events” checkbox within the Initialization trigger.
On this page
- Availability of the setting
- Default behavior of Google Tag Manager containers (gtm.js vs gtag/js)
- How the Initialization trigger works
- Recommended migration path
- Frequently asked questions
Availability of the setting
The checkbox appears only on web containers that were migrated from the Google tag (gtag.js) experience to Google Tag Manager i.e., containers that were created and used as a Google tag (for example G-, AW-, DC-, or GT- IDs) before they became Tag Manager containers.
- Migrated Google tag containers: the option is shown on the Initialization trigger, and a related legacy trigger type is available (marked with a Legacy badge).
- Standard Tag Manager containers (GTM-) that were never Google tag containers: the option is not shown, and there is nothing to change. These containers already behave as described in “Default behavior of Google Tag Manager containers” below.
Default behavior of Google Tag Manager containers (gtm.js vs. gtag/js)
How a container initializes depends on which snippet script loads the container on your webpage and whether the checkbox is checked:
- Standard GTM containers and the /gtm.js snippet: By default, standard Google Tag Manager containers, and any container loaded via the /gtm.js script path (including /gtag/js/gtm.js?id=...), initialize immediately upon container load (gtm.init event), right after Consent Initialization (gtm.init_consent) and before any other triggers fire. They ignore in-page gtag('config') commands for trigger initialization and are completely unaffected by this checkbox.
- Legacy /gtag/js snippet: The checkbox only affects containers loaded via the legacy /gtag/js?id=... script path.
Initialization behavior summary
The following table summarizes when the Initialization trigger fires across snippet types and checkbox settings:
| Container script path |
Checkbox checked (Migrated default) |
Checkbox unchecked (Standard GTM behavior) |
|
/gtm.js |
Fires immediately on container load (gtm.init). Ignores on-page gtag('config') commands. | Fires immediately on container load (gtm.init). Ignores on-page gtag('config') commands. |
| /gtag/js | Waits to fire until an in-page gtag('config', '<TAG_ID>') command runs for an allowed container ID (gtag.config). | Fires immediately on container load (gtm.init), without waiting for an in-page gtag('config') command. |
How the Initialization trigger works
When the checkbox is checked
When the “Support gtag('config') initialization events” is checked and your container loads via /gtag/js:
- Waits for gtag('config'): Destination tags using this Initialization trigger wait to fire until the webpage executes a gtag('config', '<TAG_ID>') command matching an ID in the Allowed Container IDs list.
- Merges UI and in-page configurations: Parameters passed in the on-page gtag('config', '<TAG_ID>', { ... }) command are merged with the configuration defined in your Destination Tag in the Tag Manager UI:
- Tag Manager UI takes precedence: If the same parameter is configured in both the Tag Manager UI and the in-page gtag('config') command, the Tag Manager UI value overrides the in-page value.
Implications of unchecking the checkbox
Unchecking “Support gtag('config') initialization events” transitions a container loaded via /gtag/js from legacy gtag('config') initialization to standard Google Tag Manager initialization. Before unchecking this box, review the following implications:
- Tags fire immediately on container load (gtm.init)
- Your destination tags will no longer wait for an in-page gtag('config') command to run. Instead, they will fire automatically during the standard Tag Manager initialization loop (gtm.init) as soon as the container loads.
- If you have removed—or plan to remove—gtag('config') commands from your website's HTML while still loading the /gtag/js script, you must uncheck this box so your destination tags continue to fire on page load.
- In-page gtag('config') parameters are no longer applied at initialization
- Because the Initialization trigger fires on container load rather than waiting for the gtag('config') command, any configuration parameters defined in an on-page gtag('config', '<TAG_ID>', { ... }) call (such as send_page_view, user_id, currency, linker settings, or custom event parameters) will no longer be applied when the destination tag initializes.
- Action required: Before unchecking this box, copy all configuration parameters from your in-page gtag('config') commands into your Google Tag (Destination Tag) configuration settings in the Tag Manager UI.
- Automatic page views are sent on container load, which can create duplicates
- Once the tag fires at initialization, it sends its automatic page view immediately. If your site or platform also sends its own page view (for example an ecommerce platform integration, an app-managed pixel, or a manual page_view event), you can end up with duplicate page views.
- Action required: Check for other sources of page view events before turning the setting off.
- Event ordering and values can shift
- Values that your page sets shortly after load (for example via gtag('set', ...) or a data layer push that runs after the container) may not be available yet when the tag fires. Events previously deferred until the config command are now sent earlier.
- Stale config commands become inert
- While your page code doesn't need to change, stale config commands on your page become inert.
- You can leave the existing gtag('config') commands on your pages; for this container they simply stop having an effect. Removing them once you've finished migrating keeps your pages simpler and faster.
Recommended migration path
- Inventory your in-page config settings. Collect every parameter passed in gtag('config', ...) on your site, including settings applied on only some pages.
- Move them into Tag Manager. Add these settings to the corresponding destination tag (or Google tag) configuration in the Tag Manager UI. Learn more about how to Configure your Google tag settings
- Check for other page view sources. Confirm that no platform integration, plugin, or custom code will send a second page view once your tag fires at initialization.
- Uncheck the box on the Initialization trigger.
- Preview and debug. In Tag Assistant, confirm your tag fires on Initialization, that all expected parameters are present, and that exactly one page view is sent per page.
- Publish, then monitor page views, events, and conversions for a few days.
If something looks wrong, re-check the box, ensure all the IDs are present in the Allowed Container IDs list, and publish again to restore the previous behavior.
Frequently asked questions
Do I have to change anything?
No. Existing installations remain fully supported. Migrated containers keep working with the box checked and no changes to your site.
Why is this option recommended to be turned off eventually?
Waiting for an in-page config command delays tag firing and depends on code deployed on your site. Standard initialization is faster, more reliable, and keeps all configuration in one place via the Tag Manager UI.
I don't see the checkbox. Why?
Your container was not migrated from a Google tag, the container is not a web container, or the container never used the relevant tag ID. In these cases your container already uses standard initialization behavior.
Can I keep legacy support for some tags and not others?
Yes. The setting lives on the trigger, so you can use one Initialization trigger with legacy support for the tags that still depend on in-page config commands and a standard Initialization trigger for the rest.
What if a config command uses an ID from a different container?
Add that ID under Additional container IDs. The tag will then fire on config commands for that ID, and the settings from the command will be merged into the tag's configuration.