https://github.com/mcansh/remix-web-vitals
https://github.com/mcansh/remix-web-vitals
Last synced: 8 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/mcansh/remix-web-vitals
- Owner: mcansh
- Created: 2023-06-01T21:03:48.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-01-11T19:21:52.000Z (almost 2 years ago)
- Last Synced: 2024-10-18T06:27:47.778Z (about 1 year ago)
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/@mcansh/remix-web-vitals
- Size: 225 KB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# Vercel Remix Web Vitals
Save Web Vitals to Vercel
## Installation
```sh
# npm
npm i @mcansh/remix-web-vitals
# pnpm
pnpm i @mcansh/remix-web-vitals
# yarn
yarn add @mcansh/remix-web-vitals
# bun
bun add @mcansh/remix-web-vitals
```
## Usage
```tsx
import { WebVitals } from "@mcansh/remix-web-vitals";
export async function loader() {
return json({ analyticsId: process.env.VERCEL_WEB_ANALYTICS_ID });
}
export default function App() {
let { analyticsId } = useLoaderData();
return (
{analyticsId ? : null}
);
}
```