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.
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!
Thanks, BackendEvents is the closest to what I am trying to achieve. Thank you.