Master Scripts & Third Parties in Next.js
summary
Next.js Script component lets apps add external and inline scripts with an ID, event handlers (onReady/onLoad/onError) and explicit loading strategies like beforeInteractive, afterInteractive and worker, so you control timing and thread. Chrome UX Report shows more third‑party scripts correlates with worse Core Web Vitals. next‑third‑parties ships plug‑and‑play wrappers (Google Tag Manager ~66% of sites, Google Analytics ~52%), Google Maps and a lightweight YouTube embed that lazy loads via thirdpartycapital JSON manifests for optimal scripts/styles injection.
AI-written summary · about
chapters (10)
- 0:00Next.js third-party scripts
- 1:26Third-party resources
- 3:12Challenges in Next.js
- 4:15Next.js Script component
- 6:44Script placement and execution
- 7:46Optimizing script loading
- 9:11Script event handlers
- 12:26Next.js Third Parties
- 14:53How Third Parties work
- 18:05Q&A
related talks
56mThird Party Scripts
22mOptimally using third-party services with Next.js
21mBringing Excellent UX to the React Ecosystem via Strong Defaults in Next.js
30mGDPR and Third Party JS - Can It Be Done?
13m"Don't Let Third Parties Slow You Down"
59mThe Final Frontier: Security APIs in Modern Browsers
42mThe Good, The Bad, The Web Components
42mElevating the Web Platform with the JavaScript Framework Community
