An example React app using the Ampli Browser SDK. Based on create-react-app.
You will need to do the following before running the app.
- Create a
.env
with your API keyscp .env.example .env
- Set your Amplitude API key
- (Optional) To use Segment middleware set a Segment write 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 start
If you want to use your own tracking plan and Ampli SDK
npm i -g @amplitude/ampli
ampli pull
- Update
app.ts
to use the events from your tracking plan
- README.md - you are here *
-
- src/
- App.js - Example user app using Amply SDK. A good place to start.
- ampli/
- index.js - Generated SDK, don't modify by hand. Update with
ampli pull
- schema.json - The full event schema for the tracking plan
- index.js - Generated SDK, don't modify by hand. Update with
- middleware/* - Example middlewares for Segment and Event filtering