Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

351
Vistas
how do i stop google analytics from tracking a webpage from my options in VueJs or NuxtJs

I have set up google analytics in my NuxtJs app, I also have cookies that save the preferences of the users. when the user rejects the cookies, I set a cookie where Cookie.set('disableAnalytics', true);

and also in my nuxt.config.js file, I have where

require('dotenv').config()
import Cookie from 'js-cookie';

export default {
    googleAnalytics: {
        id: process.env.GOOGLE_ANALYTICS_ID,
        disableScriptLoader: Cookie.get("disableAnalytics") || false
    }
}

I EXPECT that it somehow disables the script loader, and cause google analytics to not track the user.

BUT THIS IS NOT THE CASE, when I check the analytics console while visiting the site, Google analytics is still tracking.

Please, How can I solve the problem, and stop google analytics from tracking when the disableAnalytics cookie is set to true?

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda