An example Next.js app using the Ampli Node SDK
You will need to do the following before running the app.
- Create a
.env.local
with your API keyscp .env.local.example .env.local
- Set your Amplitude API key
yarn install
You can run the app using the events from our sample tracking plan. This will log events to your Amplitude project.
yarn build && yarn start
If you want to use your own tracking plan and Ampli SDK
npm i -g @amplitude/ampli
ampli pull
- Update
pages/index.tsx
to use the events from your tracking plan
- README.md - you are here *
- pages/
- lib/
- init-ampli.ts - Example Ampli initialization. A good place to start.
- ampli/
- index.ts - Generated SDK, don't modify by hand. Update with
ampli pull
- index.ts - Generated SDK, don't modify by hand. Update with
- middleware/* - Example middlewares for Event filtering