If you have use cases where your users aren’t interacting with your app or web, you can still track their activity using Mixpanel API.
The API offers a way for developers to track server-side events, with different languages like Python.
If you go to your project’s settings, you can get a token that you can use in your tracking app.
You can use this python script I wrote for adding a user, tracking a custom event, and tracking revenue, all happening in the back-end.
If you run the script, you will see the event immediately reflected in the Live View.
![](http://blog.leocelis.com/wp-content/uploads/2019/03/Screen-Shot-2019-03-31-at-7.48.34-PM-1024x157.png)
In the Users section you can see how much revenue was generated by user. You can combine both front-end and back-end activity together for a given user if you send the same email address in the events.
![](http://blog.leocelis.com/wp-content/uploads/2019/03/Screen-Shot-2019-03-31-at-7.51.49-PM-1024x399.png)