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

142
Visualizações
Google analytics conversion interferes on my page_views

Basically, marking the google analytics page_view event as a conversion makes my page trigger two page_view events at the same time, but not marking it as a conversion, makes it not trigger any page_view events at all. These are my Scripts at _app.tsx:

<Script
  id="gtagScript"
  strategy="beforeInteractive"
  src={`https://www.googletagmanager.com/gtag/js?id=${GA_TRACKING_ID}`}
/>
<Script
  strategy="afterInteractive"
  id="gtagConfig"
>{`window.dataLayer = window.dataLayer || [];
   function gtag(){dataLayer.push(arguments);}
   gtag('js', new Date());
   gtag('config', '${GA_TRACKING_ID}', { width:  window.innerWidth, page: window.location.pathname, 'debug_mode': ${DEBUG_MODE} });`}</Script>

This script is being placed imediatelly after the closing </ head> tag and I'm really lost at this point, I've been debugging for several days.

edit: The tracking is fine when the user comes from an external source, the issue only happens when switching from one page to another (internal links). When the conversion is market, it triggers two page_view events, when it's not marked, it triggers none.

about 4 years ago · Juan Pablo Isaza
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