Solved

How to have an event performed by a unique visitor (who's not a user) added to our existing user's log

  • 3 July 2023
  • 5 replies
  • 132 views

I built a meeting scheduler product where unique visitors can book meetings on a booking page that our user created. 

I want to tag an event that is fired/triggered when our user’s booking page is booked (booking click event) → I want this event to appear on our user’s event list, but currently I can only have it tracked on the event list of the unique visitor who booked the meeting. Does anyone know what the best way is to go about tracking this event?

Essentially, if a unique visitor visits a booking page made by our user and books a meeting, I want this event to be fired and added to our existing user’s log (the user whose booking page is booked)! Any thoughts or ideas will be appreciated! 

icon

Best answer by JennRu 6 July 2023, 21:22

View original

5 replies

Userlevel 5
Badge +9

Hi @Taewoong Seo. Take a look at this:

In this example there is “lesson assigned” and “lesson started” with properties being used to see “assigned by”. In your case you’re trying to get to “booked by” which seems a pretty similar use case to the above.

Dan.

Hi @dangrainger,

Thanks for your reply! 

In the example you shared with me, if I were to add the event lesson assigned (which is tracked at the unique student ID) to another event that is performed by/tracked at the unique teacher ID, how would I go about doing this? For instance, let’s say I wanted to create a custom event group and add two events that are performed by teachers, one of them being the event of assigning a lesson. In this case, is the only solution to create a new event triggered at the teacher ID level? Or is this something I can set up by “inverting” the event property to the performed user? 

I hope this makes sense to you! 

Userlevel 5
Badge +9

Pretty sure the method @JennRu posted in the other thread is inverting the event property. Maybe she can elaborate here for you specific use case!

@JennRu If it’s possible for you have a look at my case and share any thoughts you have, it’d be appreciated! 

 

Userlevel 4
Badge +8

Hi @Taewoong Seo , how we do this internally is we track 2 distinct events

  • a server side event that fires when a user successfully triggers the action e.g. user X deletes user Y, so trigger event settings: remove user where event User ID = user X, and store an event property to identify user removed: user Y
  • a server side event that fires on behalf of the user who “received” the action e.g. user Y was deleted by user X, so trigger event settings: user removed where event User ID = user Y, and store an event property to identify removed by: User X

 

It sounds like you’ll need to set up a separate server side event for the latter scenario, such as meeting booked on behalf of the user who originally created the booking page. 

Do you need technical guidance on how to set up this reverse User ID tracking for the on behalf of server side event?

Let me know and I can try to gather some details from an engineer who set this up internally

 

Update:

One of our awesome engineers shared the following context - 

I used the node SDK to instrument the settings: user removed - which doesn't have the concept of a persistent user ID. Each logged event has to have its user defined, and the new node SDK works the same: https://www.docs.developers.amplitude.com/data/sdks/typescript-node/#tracking-an-event

Reply