Has anyone tried implementing webVitals mentioned here-
I tried the easier option of implementing the CDN script hosted here- https://email@example.com/dist/web-vitals.es5.umd.min.js
But I feel there is a timing issue and hence the data isn't getting stored in a UDO variable. The approach mentioned in the link for GTM works perfectly fine.
I have finally got this working. Since the webvitals data isn't available directly on page load, I capture each data point in localstorage. When user navigates to next page, I collect all data points into one and send it to analytics during the next page call.