Identifying users with back-end events

  • 15 December 2021
  • 1 reply


I’m struggling to understand what’s the best setup for identifying users combining client (front-end) and back-end events and I’m starting to think that it’s not possible at all.

Here’s the setup we have, at the moment:

  • We use Segment to send send client events - we have 1 app that sends events on the front-end
  • We also use Segment to send events on the back-end. We pass User ID through signup back-end event, as well as login event.

Essentially, we have 2 Segment Amplitude destinations one receiving client events and the other back-end events, all working for the same website and set of users.

So I have the following scenario:

  • User enters website and performs front-end events
  • User signs up within the same session through a back-end event.

In that scenario the front-end and back-end events are connected with the same user - different Device IDs but same Ampitude ID (let’s say 123)

Then, the same user starts a new session from a new browser (i.e., new cookie)

  • They perform front-end events - a new Amplitude ID (lets say 555) is created (as expected)
  • Then the user logs in (back-end event) and other performs back-end events

In that case, the login and any other back-end events are connected to the same Amplitude ID 123, but the front end-events stay on 555 — and 555 does not get merged with 123.

My expectation was that both front-end and back-end event would be merged to 123 once the user is identified through the login.

What are we doing wrong? Is that it that tools like Amplitude are not supposed to be used with back-end events at all?

Would appreciate your advice.



Best answer by eddie.gaona 16 December 2021, 18:38

View original

1 reply

Userlevel 4
Badge +4

Hello @kalo-encharge happy to help!


When the user logs events with a different cookie than the original the Device ID for the events will change. This is important because if User ID is not available Amplitude actually uses Device ID to track unique users.

Are you setting User ID when the user logs in? For the second scenario, are the front end and back end events associated to the same user?

In order to have Amp 555 merged into Amp 123 an event from 555 would need to match the User ID or Device ID of the Amp ID 123. Hope this makes sense!

A helpful article on how Amplitude tracks unique users and merges can be found here.