Python SDK for Got It Analytics Platform
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
-
Clone this repository
git clone https://github.com/tutoruniverse/giap_python.git
-
Install dependencies
cd giap_python poetry install
-
Install
pre-commit
hooks (if you want to develop the library)pre-commit install
from giap import GIAP
TOKEN = "123456abc"
BASE_URL = "https://analytics-api.got-it.io"
USER_ID = 123
giap = GIAP(TOKEN, BASE_URL)
# Track an event
giap.track(USER_ID, "purchase", {"product_id": "EG1_credit16"})
# Set properties for a profile
giap.set_profile_properties(USER_ID, {"email": "info@gotitapp.co"})
# Increase value of a profile property
giap.increase(USER_ID, 'count', 100)