829e2ebab6
## Description I fixed grammatical errors in a few READMEs in the `example` directory. --------- Co-authored-by: Sam Ko <sam@vercel.com> |
||
---|---|---|
.. | ||
pages | ||
utils | ||
.gitignore | ||
package.json | ||
README.md |
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:
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).