Skip to main content
Solved

How to track events not related to a user


Forum|alt.badge.img

I want to use Amplitude as my dashboard for my business.

Most events are coming from user activity, but I want to also track events that are backend / system events like "Newsletter sent” which are related to multiple users or no user at all.

Is it possible in Amplitude? 

Best answer by MikkoKarvonen

AymericG wrote:

I want to use Amplitude as my dashboard for my business.

Most events are coming from user activity, but I want to also track events that are backend / system events like "Newsletter sent” which are related to multiple users or no user at all.

Is it possible in Amplitude? 


All the events in Amplitude are related to a specific user, so in that sense that answer is ‘no’. However, you can always create a user called BackendEvents (or whatever you prefer) and use those for all these events. If necessary you can then exclude this user from your other analysis by utilizing the UserID user property.

We handle these kinds of events that come from a backend by using the HTTP API: https://developers.amplitude.com/docs/http-api-v2

Note that if you set things up this way, you cannot tie these events to specific users. So you couldn’t do things like “take all the users we sent this newsletter to and see if they reacted to it” or “create a funnel from this newsletter to users performing this event”. Instead this would allow you to count the number of newsletters sent and such generic measures.

If you want to analyse the responses of specific users, you need to trigger one “NewsletterSent” type event for each user that receives it.

View original
Did this topic help you find an answer to your question?

3 replies

MikkoKarvonen
Peer Moderator
Forum|alt.badge.img+3
  • Peer Moderator
  • 113 replies
  • Answer
  • June 11, 2021
AymericG wrote:

I want to use Amplitude as my dashboard for my business.

Most events are coming from user activity, but I want to also track events that are backend / system events like "Newsletter sent” which are related to multiple users or no user at all.

Is it possible in Amplitude? 


All the events in Amplitude are related to a specific user, so in that sense that answer is ‘no’. However, you can always create a user called BackendEvents (or whatever you prefer) and use those for all these events. If necessary you can then exclude this user from your other analysis by utilizing the UserID user property.

We handle these kinds of events that come from a backend by using the HTTP API: https://developers.amplitude.com/docs/http-api-v2

Note that if you set things up this way, you cannot tie these events to specific users. So you couldn’t do things like “take all the users we sent this newsletter to and see if they reacted to it” or “create a funnel from this newsletter to users performing this event”. Instead this would allow you to count the number of newsletters sent and such generic measures.

If you want to analyse the responses of specific users, you need to trigger one “NewsletterSent” type event for each user that receives it.


ning.chang
Team Member
Forum|alt.badge.img+7
  • Team Member
  • 72 replies
  • June 11, 2021

Hey @AymericG - 

My understanding is that you would like to log a "Newsletter sent" event that are performed automatically via backend servers. To confirm, when a newsletter is sent, would you still want the event to be tied to an individual user or users - even if they did not actively perform the event?

For example, often times, an event happens to a user rather than the user actively performing an event. An email or push notification is sent by a server but received by a user, and when you analyze the events, you want to see that event in the user's event stream rather than a makeshift server's event stream. Is that a similar situation here or are you looking to aggregate all of the server-side events to one user profile?

For additional context - when instrumenting events for Amplitude, each event must include either a User ID or a Device ID in order to identify who performed the event. 

So two scenarios:

If you wanted all of the automatically logged events to fall under the same user profile, then you can think about creating a “fake” unique User ID that identifies the event as being "automated" e.g. "userID: automatically-performed". By always using the same userID to identify these automatic events, we hope to be able to see how many automated events in total are performed over time.

If you'd still like to associate the "Newsletter sent” event with a user but still be able to differentiate between a real user and the server, you can also make use of event properties. For example, add an event property to the "Newsletter sent" event such as "trigger" and populate it with values such as "manual" or "automatic". 

More information on how Amplitude tracks unique users can be found here: https://help.amplitude.com/hc/en-us/articles/115003135607

Hope all these are helpful!


Forum|alt.badge.img
  • Author
  • New Member
  • 1 reply
  • June 11, 2021

Thanks, BackendEvents is the closest to what I am trying to achieve. Thank you.


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