Vue-meta: Feature Request: add scripts right after opening <body> tag

Created on 28 May 2019  路  3Comments  路  Source: nuxt/vue-meta

Right now it is possible to add a script before the closing tag using the body: true flag, however it is often desired to also have the option to add them right after the opening (for example to implement this one: https://github.com/nuxt-community/modules/issues/263). Any chance this gets impelmented? I'm happy to assist/implement if we can decide/find a proper API .

enhancement pending

Most helpful comment

I think it's a good idea to have that option available 馃憤

All 3 comments

From vue-meta's side this is easily implemented, but it would be up to Nuxt to use/implement that extra functionality.

@manniL @pi0 @clarkdo Wdyt?

I think it's a good idea to have that option available 馃憤

Hi guys, I need to add Google Tag Manager to my Nuxt app. Added https://www.npmjs.com/package/@nuxtjs/google-tag-manager and working fine.

image

I can easily add the first part as a script and load it with:

import pkg from './package'
export default {
  mode: 'spa',
  head: {
    script: [
      { src: '/gtm.js' }
    ]
    ...

But I can't find a workaround for adding the No-Script iframe content :(

Is this feature going to be integrated in Nuxt soon? Are there any quick workarounds people use for this?

Thanks so much!!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

farhodhojiev picture farhodhojiev  路  4Comments

Bigdragon13th picture Bigdragon13th  路  8Comments

Emilie-thp picture Emilie-thp  路  8Comments

achen224 picture achen224  路  9Comments

iMomen picture iMomen  路  5Comments