var GTM = module.exports = integration('Google Tag Manager')
.assumesPageview()
.global('dataLayer')
.global('google_tag_manager')
.option('containerId', '')
.option('trackNamedPages', true)
.option('trackCategorizedPages', true)
.tag('<script src="//www.googletagmanager.com/gtm.js?id={{ containerId }}&l=dataLayer">');
Do something like this.
var GTM = module.exports = integration('Google Tag Manager')
.assumesPageview()
.global('dataLayer')
.global('google_tag_manager')
.option('containerId', '')
.option('environment', '')
.option('trackNamedPages', true)
.option('trackCategorizedPages', true)
.tag('<script src="//www.googletagmanager.com/gtm.js?id={{ containerId }}&l=dataLayer>m_preview={{ environment }}">');