diff --git a/cognee/shared/utils.py b/cognee/shared/utils.py index 709d0a0de..8b0c26949 100644 --- a/cognee/shared/utils.py +++ b/cognee/shared/utils.py @@ -54,6 +54,11 @@ def extract_pos_tags(sentence): def get_anonymous_id(): """Creates or reads a anonymous user id""" + tracking_id = os.getenv("TRACKING_ID", None) + + if tracking_id: + return tracking_id + home_dir = str(pathlib.Path(pathlib.Path(__file__).parent.parent.parent.resolve())) if not os.path.isdir(home_dir):