i think it would be better to:

1. set up a _BASE_URL = "http://api.mixpanel.com" constant, and then pass a "path" variable around, i.e., "/track" and "/engage", so you don't have to duplicate the shared part of the URL.

2. make _BASE_URL a file-level constant (but this is more a stylistic point)

3. I think it may be https, not http, but you'll have to check the other libs