Home

Issue: 674

google tag manager example

[issue link]

it’s almost the most developer friendly technology ever, in my opinion … keep moving forward.

Steps to reproduce
i’v tryed to add https://tagmanager.google.com to my nuxt app,
followed this example https://nuxtjs.org/faq/google-analytics here and it works fine for just google analytics,
unlike analytics … google tag manager requires two steps to include it in your app the first is a head script tag, the other is a noscript tag needs to be placed immediately after body opening tag.
this is the script tag included as explaned in the analytics example:
screenshot from 2017-05-06 21-15-12

this the included noscript tag:

<noscript>
    <iframe src="//www.googletagmanager.com/ns.html?id=GTM-XXXXXX" height="0" width="0" style="display:none;visibility:hidden"></iframe>
</noscript>

it works but with no effect router.afterEach()
and it causes this error
screenshot from 2017-05-06 21-08-54

thanks in advance …

This question is available on Nuxt.js community (#c580)