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

147
Vistas
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 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