Skip to content

Commit 99ac126

Browse files
authored
feat: track INP vitals (#73)
1 parent eb37fd6 commit 99ac126

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/runtime/web-vitals.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,13 @@ export async function webVitals({ route, options, sendToAnalytics }) {
1313

1414
try {
1515
// eslint-disable-next-line @typescript-eslint/no-explicit-any
16-
const { onCLS, onFID, onLCP, onTTFB, onFCP } = await import('web-vitals').then((r: any) => r.default || r) as typeof import('web-vitals')
16+
const { onCLS, onFID, onLCP, onTTFB, onFCP, onINP } = await import('web-vitals').then((r: any) => r.default || r) as typeof import('web-vitals')
1717
onFID(metric => sendToAnalytics(context, metric, options))
1818
onTTFB(metric => sendToAnalytics(context, metric, options))
1919
onLCP(metric => sendToAnalytics(context, metric, options))
2020
onCLS(metric => sendToAnalytics(context, metric, options))
2121
onFCP(metric => sendToAnalytics(context, metric, options))
22+
onINP(metric => sendToAnalytics(context, metric, options))
2223
}
2324
catch (err) {
2425
logError(err)

0 commit comments

Comments
 (0)