rsnext/examples/with-react-ga4/README.md
Okoye Charles 829e2ebab6
Resolve grammatical errors in examples (#65644)
## Description
I fixed grammatical errors in a few READMEs in the `example` directory.

---------

Co-authored-by: Sam Ko <sam@vercel.com>
2024-05-13 17:10:40 +00:00

1.6 KiB

React-GA4 example

As of May 2023, react-ga uses Universal Analytics which will stop processing new data starting July 2023. Until this is fixed, this example has been updated to use react-ga4 instead.

This example shows the most basic way to use react-ga4 using a custom App component with Next.js. Modify Tracking ID in utils/analytics.js file for testing this example.

Deploy your own

Deploy the example using Vercel:

Deploy with Vercel

How to use

Execute create-next-app with npm, Yarn, or pnpm to bootstrap the example:

npx create-next-app --example with-react-ga4 with-react-ga-app
yarn create next-app --example with-react-ga4 with-react-ga-app
pnpm create next-app --example with-react-ga4 with-react-ga-app

Deploy it to the cloud with Vercel (Documentation).