diff --git a/src/Snippets.js b/src/Snippets.js index b798e3db..a58c6593 100644 --- a/src/Snippets.js +++ b/src/Snippets.js @@ -5,7 +5,7 @@ import warn from './utils/warn' const Snippets = { tags: function ({ id, events, dataLayer, dataLayerName, preview, auth }) { const gtm_auth = `>m_auth=${auth}` - const gtm_preview = `>m_preview=${preview}` + const gtm_preview = !preview ? '' : `>m_preview=${preview}` if (!id) warn('GTM Id is required')