From 1a49974f984377d963415c029e5039e106dd4dae Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Mon, 12 Aug 2024 16:11:20 -0700 Subject: [PATCH] feat: add aider version number to all events --- aider/analytics.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/aider/analytics.py b/aider/analytics.py index 7ef200490..cd86132d0 100644 --- a/aider/analytics.py +++ b/aider/analytics.py @@ -3,6 +3,7 @@ import uuid from pathlib import Path from mixpanel import Mixpanel +from aider import __version__ class Analytics: @@ -31,4 +32,7 @@ class Analytics: def track_event(self, event_name, properties=None): if self.mp: + if properties is None: + properties = {} + properties['aider_version'] = __version__ self.mp.track(self.user_id, event_name, properties)