Provide backend API endpoint to forward Amplitude events
In https://gitlab.com/gitlab-org/gitlab-ce/issues/46030#note_72239404 it was decided that we should proxy events sent to Amplitude through the backend (using the HTTP API) rather than using the JavaScript SDK from the frontend.
Therefore we need a backend endpoint that accepts a POST request with a JSON array of events as payload and forwards them in a Sidekiq worker. An event can contain these keys—however a backend validation is not necessary as it will happen at Amplitude anyway.
The endpoint can return
- 204 if queueing the events was successful
- 501 if no Amplitude API key is stored
Edited by Inactive Account