nuxt-community / gtm-module

Google Tag Manager Module for Nuxt.js
MIT License
328 stars 70 forks source link

Noscript tag rendering with ampersand in src #106

Open VladimirMoroz95 opened 3 years ago

VladimirMoroz95 commented 3 years ago

image I copied settings from https://github.com/nuxt-community/gtm-module, but gtm not working.

misterorion commented 3 years ago

I had this problem too and analytics team was complaining at me.

My temporary solution was to manually remove that code from line 95 in the module.js file.

Before:

  const renderIframe = id => `<iframe src="${options.noscriptURL + '?id=' + id + '&' + queryString}" height="0" width="0" style="display:none;visibility:hidden" title="gtm"></iframe>`

After:

  const renderIframe = id => `<iframe src="${options.noscriptURL + '?id=' + id}" height="0" width="0" style="display:none;visibility:hidden" title="gtm"></iframe>`