The Snowplow Python Tracker allows you to track Snowplow events from your Python apps and games.
There are three basic types of objects you will create when using the Snowplow Python Tracker: subjects, emitters, and trackers.
A subject represents a user whose events are tracked. A tracker constructs events and sends them to one or more emitters. Each emitter then sends the event to the endpoint you configure. This will usually be a Snowplow collector, but could also be a custom event store.
Assuming you have completed the Python Tracker Setup for your Python project, you are now ready to initialize the Python Tracker. There are two ways to this:
Tracker instances must be initialized with an emitter. This section will go into more depth about the Emitter class and its subclasses.
You may have additional information about your application's environment, current user and so on, which you want to send to Snowplow with each event.
📄️ Event Tracking
The Python tracker makes it simple to track a selection of out-of-the-box events as well as the ability to define your own custom events.
Python is a dynamically typed language, but each of our methods expects its arguments to be of specific types and value ranges. To avoid wrong inputs, the tracker takes two approaches:
The emitters.py module has Python logging turned to give you information about requests being sent. The logger prints messages about what emitters are doing. By default, only messages with priority "INFO" or higher will be logged.
📄️ Upgrading to Newer Versions
This page gives instructions to upgrading to newer versions of the Python Tracker
🔗 API reference
📄️ Example Applications
Check out the following example applications that can be used as a reference for how to use the tracker, or as a starting point for your own implementation.
🗃️ Previous versions