Skip to main content
Question

Which data source should I choose for a Next.js 13 project (App Router)?


Which data source should I choose for a Next.js (NextJS) 13 project (using App Router mainly)?

The correct option isn’t clear in the “Select a Data Source” page, where I only see NodeJS SDK and React Native SDK as the closest possible matches (maybe).

Thanks in advance for your reply.

2 replies

I’m still in the midst of setting up Amplitude in my org’s codebase, I haven’t started though but have been testing on Postman. My company’s app is also using Nextjs, and in my humble opinion, using HTTP API would be the easiest option as we could directly call the API from the client-side when we’re sending payload of a specific event, for example on sign-up button.


paladin8
Team Member
Forum|alt.badge.img+4
  • Team Member
  • 26 replies
  • November 21, 2023

If you’re instrumenting typical client-side events, use the Browser SDK: https://www.docs.developers.amplitude.com/data/sdks/sdk-quickstart/#browser. You can see an example here: https://javascript.plainenglish.io/how-to-implement-amplitude-in-next-js-a-3-step-guide-6803c44ca862.

If you’re instrumenting server components, use the Node SDK: https://www.docs.developers.amplitude.com/data/sdks/sdk-quickstart/.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings