title: how to add gtm dataLayer to nuxt.js component?
body: <p>I have a problem adding to dayaLayer. For gtm I use this <a href="https://github.com/nuxt-community/modules/tree/master/packages/google-tag-manager" rel="noreferrer">plugin</a>, but I don’t understand how to add dataLayer for it through the component.
  My nuxt.config fo plugin</p>
  
  <pre><code>modules: [
      ['@nuxtjs/google-tag-manager', {
        id: 'GTM-xxxxxxxxxx',
        pageViewEventName: 'nuxtRoute',
        pageTracking: true,
        layer: 'dataLayer'
      }]
    ]
  </code></pre>
  
  <p>My component</p>
  
  <pre><code>head() {
      return {
        title: this.seo.title_meta,
        meta: [
          // hid is used as unique identifier. Do not use `vmid` for it as it will not work
          { hid: 'google-site-verification', name: 'google-site-verification', content: 'test' },
          { hid: 'description', name: 'description', content: this.seo.description_meta }
        ],
        __dangerouslyDisableSanitizers: ['script'],
        script: [
          {
            innerHTML: JSON.stringify({
              '@context': 'http://schema.org',
              '@type': 'Organization',
              name: 'test',
              url: 'https://test.co',
              sameAs: this.linkMeta,
              description: `${this.seo.description_meta}`
            }),
            type: 'application/ld+json'
          },
          {
            innerHTML: `
              window.dataLayer = window.dataLayer || [];
              window.dataLayer = [{ 'pageType': 'Main'}]
            `
          }
        ]
      };
    },
  </code></pre>
  
  <p>I tried to add a script with dataLayer to the head but nothing came of it. My Google Tag Assistant plugin does not find dataLayer. Thanks for any help!</p>