Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

130
Visualizações
Disable Google Analytics during development - Svelte

I've made a page in Svelte and added Google Analytics. I have some mess in my code, because in index.html file I have link <script async src="https://www.googletagmanager.com/gtag/js?id=G-XXXXXXXXXX">

And in main.js file I have code like this

window.dataLayer = window.dataLayer || []

function gtag () {
  window.dataLayer.push(arguments)
}

gtag('js', new Date())
gtag('config', 'G-XXXXXXXXXX')

I want to disable Google Analytics in development mode. I've tried to use window['ga-disable-GA_MEASUREMENT_ID'] = true;, package called gtag-opt-in, but none of this solution helped me.

I'll be grateful for some simple and working solution.

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

maybe this is not technical solution on programming side, but you can try to add this extension on your Google Chrome :

https://chrome.google.com/webstore/detail/developer-cookie/lknhpplgahpbindnnocglcjonpahfikn

it will "pause" Google or other analytic tools to counting any data when you activate this extension.

let me know if this can help :)

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda