Skip to main content

Hi!

I want to be able to track when a user logs into the app as an event, but I’m not sure how to go about this?

Would it be best to implement it on the frontend or backend?

Thanks :)

Hi @eriisu, thanks for your question!

Either option can work! If you’d like to send the Login event via one of our SDKs (e.g. JavaScript SDK), you can install that in your frontend. Here’s some documentation on logging events with JS SDK: https://developers.amplitude.com/docs/javascript#sending-events

If sending from the backend, you can use our HTTP API directly: https://developers.amplitude.com/docs/http-api-v2

Simply trigger the logEvent code or trigger the API call when the user completes the action.

Let us know if you have any questions!


Reply