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

141
Views
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
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!