Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

352
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!