Impact on INP due to GTM #80748
Unanswered
chandra2607
asked this question in
Help
Replies: 2 comments
-
@chandra2607 Did you find a solution? I’m having the same problem and have tried many fixes, but none of them worked. |
Beta Was this translation helpful? Give feedback.
0 replies
-
hey @aviraljain19 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
High INP Scores Due to GTM Event Processing
Issue Summary
Experiencing high Interaction to Next Paint (INP) scores (Core Web Vitals) when using Google Tag Manager with
@next/third-parties/google
in Next.js 14.2. GTM appears to intercept and process events before native handlers, causing significant performance degradation.Performance Impact
Current Setup
our code looks like this
Simple anchor links for smooth scrolling to page sections:
Expected: Fast navigation to page sections
Actual: GTM processes the click event extensively before native scroll behavior
🔍 Investigation Results
Performance Panel Analysis
What We've Tried
❌ Attempt 1:
preventDefault
+requestAnimationFrame
Result: GTM still processes first, no performance improvement
📋 Environment Details
@next/third-parties/google
Looking forward to community insights and potential solutions!
Tags: #performance #core-web-vitals #gtm #analytics #next-third-parties
Additional information
No response
Example
No response
Beta Was this translation helpful? Give feedback.
All reactions