Our Python Library has the basic functionality laid out in our API specifications. It allows you to record events and set properties. However, you might miss these features:

  • No built-in mechanisms for generating and saving identities for your users

  • No built-in mechanisms for automatically tying together anonymous and named identities.

  • No built-in mechanisms for running A/B tests

  • No automatic triggering of Events (such as detecting Search Engine traffic)

  • Does not support scheduling sending data via cron

For these reasons we recommend our JavaScript Library to our users, and to use the Python Library for recording events that occur server-side (account Upgrades may be an example of one such event). You might also consider looking at other APIs our customers have created.


You can download a copy of the API from: You will need your API key which you can find in your site settings.

Example Calls


import KISSmetrics  # Load the Kissmetrics library
KM = KISSmetrics.Client('mySuperSecretApiKey')  # Initialize a client with a valid API key
KM.record('', 'Viewed Homepage')
KM.record('', 'Signed Up', {'Plan' : 'Pro', 'Amount' : 99.95})
KM.record('', 'Signed Up', 1234567890)  # Pass in an optional timestamp
KM.set('', {'gender': 'male'})

Additional Reading

There are more detailed examples and documentation at


If you were watching the events in Sandstorm Live and did not see them, it helps to review what our library logged. The Python library keeps a log file at:

  • /tmp/kissmetrics_error.log If you contact support to troubleshoot, please refer to the contents of these files, if possible.

Last updated