Drodevbar posted a new question

modules •

[@nuxtjs/google-tag-manager] <noscript> tag appends to <head> instead of <body>

I am currently using @nuxt-js/google-tag-manager in version 2.3.1. The source code comments say that <noscript> fallback will be appended right after <body> tag, but actually it is appended somewhere inside <head></head> tags. Is this behaviour intended?



monodyle posted a new question

modules •

@nuxtjs/markdownit plugin markdown-it-anchor log error

markdownit version: 1.2.7

I've tried to add markdown-it-anchor plugin following markdown-it-attrs and markdown-it-div, but console throw back an error:

error TypeError: plugin.apply is not a function
    at MarkdownIt.push../node_modules/markdown-it/lib/index.js.MarkdownIt.use (
    at app.js:2459
    at _callee2$ (app.js:2330)
    at tryCatch (
    at Generator.invoke [as _invoke] (
    at Generator.prototype.<computed> [as next] (
    at asyncGeneratorStep (
    at _next (


   ** Nuxt.js modules
  modules: [
  markdownit: {
    injected: true,
    preset: 'default',
    html: true,
    linkify: true,
    breaks: true,
    use: [
    highlight: (str, lang) => {
      const hljs = require('highlight.js');
      if (lang && hljs.getLanguage(lang)) {
        try {
          return '<pre class="hljs"><code>' +
                  hljs.highlight(lang, str, true).value +
        // eslint-disable-next-line no-empty
        } catch (__) {}
      return '<pre class="hljs"><code>' +  hljs.highlight('plaintext', str, true).value + '</code></pre>';

memic84 posted a new question

modules •

[Google Tag Manager] possible to load the vars async

I am using runtime vars for my project, where the vars get loaded on nuxt start.
The Google Tag Manager module won't build the module, if there is no ID set.
The problem is that i don't have any .env files when the build is occurring, but only when the deployments starts.

Is it possible to load the vars async, of make the ID optional during the build?
I want to be able to use the module in universal mode (ssr), with runtime vars.


LuXDAmore posted a new bug report

modules •

bug @nuxt/browserconfig - Change the static dir



Reproduction link

Steps to reproduce

path.resolve(this.options.srcDir, 'static', browserconfigFileName) and content: '/' + browserconfigFileName, these paths should be taken from the Dir property.

What is expected ?

Put the file (and the path) in the right directory.

What is actually happening?

Always put the file in the /static folder.


nachogarcia posted a new bug report

modules •

bug Google Tag Manager needs Jquery



Steps to reproduce

Install the module, add the ID and start the app.

What is expected ?

The module works properly

What is actually happening?

It breaks because it needs Jquery

VM9248:1 Uncaught ReferenceError: jQuery is not defined
    at sender (<anonymous>:1:37)
    at <anonymous>:1:316
    at gtm.js?id=GTM-******&l=dataLayer:4683
    at c (gtm.js?id=GTM-******&l=dataLayer:4685)
    at Ab (gtm.js?id=GTM-******&l=dataLayer:4487)
    at e (gtm.js?id=GTM-******&l=dataLayer:4531)
    at gtm.js?id=GTM-******&l=dataLayer:4476
    at Array.<anonymous> (gtm.js?id=GTM-******&l=dataLayer:4532)
    at (gtm.js?id=GTM-******&l=dataLayer:4531)
    at Oe (gtm.js?id=GTM-******&l=dataLayer:4532)

Looks like GTM needs jQuery to work. Maybe we should put it as a peer dependency.

Additional comments?

I'm also using and it works flawlessly.


Panksi posted a new question

modules •

Nuxtjs/toast: How to pass message to globally configured toast module

How to pass message to globally configured toast module?

In my nuxt file I have:
modules: [ // Doc: '@nuxtjs/axios', '@nuxtjs/toast', '@nuxtjs/eslint-module' ], toast: { position: 'top-right', register: [ // Register custom toasts { name: 'my_error', options: { type: 'error', theme: 'bubble', duration: '7000' } } ] },

and I tried passing the message with:

updateApplication(fields) { ApplicationService.updateApplication(this.application.app_id, fields) .catch((e) => this.$ },

what am I missing here?


memic84 posted a new question

modules •

Google Tag Manager vars on runtime

We are using the universal mode, import the env vars on runtime. Therefore we don't use any baked in vars during the build.
It seems that when the GTM module gets baked in, during the build and that's not possible to use runtime vars.

Is there a way, of using runtime vars with the module? I did see in the code, that if GTM_ID is not set, the module won't be inserted.


9137 posted a new question

modules •

How do I override GTM event object for page tracking?

Any idea how do I supply the to.gtm value passed in the line linked below? I tried modifying the to object by hooking onto beforeRouteEnter in a component but the value doesn't seem to get through.


shuyanzi posted a new question

modules •


what's the following params means?

pageTracking: false,
pageViewEventName: 'nuxtRoute',
respectDoNotTrack: false,
query: {
// query params…
gtmauth: '…', gtmpreview: '…',
gtmcookieswin: '…'


Jones-S resolved the question #c170

modules •

Google Tag Manager – Track only with Opt-In

Indeed it was because I had to use actual cookies.
Then it should work.
Also it was necessary to push an event manually which the module normally does on each routechange. (I just trigger it as soon as the user opts-in)


Jones-S posted a new question

modules •

Google Tag Manager – Track only with Opt-In

I want to only track page views when the user opts-in.
I have an opt-in button that sets a localStorage cookie cookie:accepted to true.

Now I want to use my trigger nuxtRoute only to be triggered if that cookie is set to true.

So my trigger has this rule:
Screenshot 2019-10-09 at 14 55 29

Where the referenced variable looks like this:
Screenshot 2019-10-09 at 14 58 43

But still my nuxtRoute trigger appears in the debug bar all the time.
Screenshot 2019-10-09 at 15 00 36

Is this because I use localStorage instead of a cookie?
Or is this the wrong approach to handle this?

I would be really glad if somebody could elaborate a bit how this module is actually used…

Thank you in advance.


AlexZd posted a new question

modules •

Brackets rendering does not work

When I'm trying to render MD as following:

<div class="md" v-html="$md.render('Hello World! ~~olo~~ **test**')">

It is working fine, but my eslint is complaining about XSS attack, I know I can add command to ignore but not sure that it is proper way. So i tried to do like:

<div class="md">
   {{ $md.render("Hello World! ~~olo~~ **test**") }}

But in this case it is showing just html string:

<p>Hello World! <s>olo</s> <strong>test</strong></p>

My config:

markdownit: {
    linkify: true,
    breaks: true,
    injected: true

Is there way to avoid using v-html and use brackets instead?


Zsavajji posted a new question

modules •

Tag Manager module - release

Are there any plans to update the npm release of the tag-manager module to include the latest pull request?
I'm gonna need that for a project soon :)



sabutai posted a new question

modules •

[toast] how use toast in Vuex?

I want to fire up toast after I get an Axios response in vuex actions.
action for example:
deletePage: async (context, payload) => {
await axios
.then((response) => {
if (response.status === 200) {
context.commit('deletePage', payload);
.catch(err => {
in this case I'm get TypeError: "_this is undefined"

What should I do?


inweid posted a new question

modules •

webvisor does not work in yandex.metrika



Steps to reproduce
include to the project

What is actually happening?
webvisor is not vorked


jpsc posted a new feature request

modules •

idea Critical CSS Module

What problem does this feature solve?

The short version:
Improve First Contentful Paint

The longer version:
No matter how much you optimize your css size (hint: purgeCSS) you will most likely load too much for the screen you are showing.
Critical CSS module would help with optimizing the loading of your styles without blocking the page render.
This link explains clearly the benefits.

What does the proposed changes look like?

We can use either criticalCSS or critical on the module and add a module to nuxt.config (only on production) that would generate the critical inline css and append it to the page.
We can then load the remaning css async. This should only work if extractCSS is active.


VarghaSabee posted a new question

modules •

@nuxtjs/google-tag-manager TypeError: The 'request' argument must be string. Received type object

I have this error. I cant add id to google-tag-manager module

After reinstall the module !Solved!


KO-Good-code posted a new question

modules •

Failure to use

I can't find the markdown-it-div module by installing the error message according to your document


the1nikola posted a new question

modules •

Markdown-it: How to avoid parent div duplication and still add .class on all instances?

I'm only starting out with vue and nuxt so pardon me if I'm asking something too basic or impossible.
How to avoid parent div duplication and still add an id or class on all instances? (For static site generation)

<section id="hello">
  <p>Hi Tony!</p>

Following example usage on nuxtjs/markdownit:

  1. using .vue - produces a single <section> parent, but don't know how to avoid writing the dread that is <hello id="hello" /> every time.
  2. using .md - duplicates parent div, result is <div id="hello"><section>....
  3. using $md to render - same as above.

Constraints (?)

I don't want to use scoped styling because I would be targeting p and img elements (and that would be bad I believe). Moreover, I'd like to have those elements navigable with Ofc, p and img are generally styled elsewhere, but I still want to adjust their positions on a per section basis.

markdown-it-attrs doesn't solve my problems because it adds classes to specific children elements and not to the parent section. Likewise with markdownit-container.

I guess what I want is not available from what I see on markdown-it-loader line 35 return '<section>' + html + '</section>\n' and not something like return '<section :attrs>' + html + '</section>\n'

Ideally, I would like a way to say

  <hello />

    // available both in component and here

with hello.vue being e.g. (since there is no parent el available)

<template lang="md" id="hello">
  Hi {{ name }}!

or (still great but a bit less clean and less functional)

  <md id="hello" src='~/path/to/some/MD' />
  // in which md.vue component is e.g. a factory or translator taking the path to .md and importing it for the main file

    // only available in here
    // (though md can possibly be extended with style later)



renovate[bot] posted a new question

modules •

Action Required: Fix Renovate Configuration

There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.

Error type: Cannot find preset's package (@nuxtjs)