3c001aaae9
Update the README for `examples/with-segment-analytics`:
- Update reference from `_document.js` (removed in
|
||
---|---|---|
.. | ||
components | ||
pages | ||
.gitignore | ||
package.json | ||
README.md |
Example app with analytics
This example shows how to use Next.js along with Segment Analytics. A custom app is used to inject the Segment Analytics.js snippet. The server and client-side call the Page API, while components call the Track API on user actions (Refer to contact.js
).
Deploy your own
Deploy the example using Vercel or preview live with StackBlitz
How to use
Execute create-next-app
with npm or Yarn to bootstrap the example:
npx create-next-app --example with-segment-analytics with-segment-analytics-app
# or
yarn create next-app --example with-segment-analytics with-segment-analytics-app
# or
pnpm create next-app -- --example with-segment-analytics with-segment-analytics-app
Deploy it to the cloud with Vercel (Documentation).