The easy way to integrate track apis for interakt
Project description
Interakt Track Python
Getting Started
Install interakt-track-python
using pip
pip install interakt-track-python
Inside your app, you’ll want to set your write_key
before making any track calls:
import track
track.write_key = "YOUR_WRITE_KEY"
Development Settings
The default initialization settings are production-ready and queue messages to be processed by a background thread.
In development you might want to enable some settings to make it easier to spot problems. Enabling track.debug
will log debugging info to the Python logger. You can also add an on_error
handler to specifically print out the response you’re seeing from our API.
def on_error(error, data):
print("An error occurred:", error)
track.debug = True
track.on_error = on_error
Identify
The identify
lets you tie a user to their actions and record traits about them. It includes a unique User ID or Phone Number and Country Code any optional traits you know about them.
Either of the two for user identification is required:
- user_id
- phone_number with country_code
Example identify
call:
track.identify(
user_id="<USER_ID>",
traits={
"name": "John Doe",
"email": "john@email.com",
"age": 24
}
)
Event
event
lets you record the actions your users perform. Every action triggers what we call an “event”, which can also have associated properties.
Example event
call:
track.event(
user_id="<USER_ID>",
event="Add to Cart",
traits={"amount": 200}
)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for interakt-track-python-0.0.9.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 29071e7a3706e3618390803fb5ddb12261bb8c48d73eaf6a3bb423c16efee4b9 |
|
MD5 | 4c7df60d252e554ebf34a94059702ecb |
|
BLAKE2b-256 | 1d931bdd1600579453bf9c845ac542caef4ef5a00985b9ccc2078e62b4af66bb |
Hashes for interakt_track_python-0.0.9-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5769f73839357c7d2bc6c9b3869b5b81745e5d3c3bd4ab540794013c5764df1b |
|
MD5 | 33600e7855e0b01e11a49e6880194a5f |
|
BLAKE2b-256 | b898530f7f443379fb99c621c3d84346f1ffb8e4acdb4bd06a0df7e5a0f2a5ba |