Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve mixpanel usage statistics #2238

Merged
merged 49 commits into from
Apr 25, 2024
Merged

improve mixpanel usage statistics #2238

merged 49 commits into from
Apr 25, 2024

Conversation

cebtenzzre
Copy link
Member

@cebtenzzre cebtenzzre commented Apr 18, 2024

Goals of this PR:

  • Make it easier to add and modify events
  • Better tracking of session duration
  • Send events more frequently, especially within a single chat session
  • Send more LocalDocs-related events

New events:

  • ipify_complete: when the user's IP address has been determined (happens after startup now)
  • response_complete: when the model has finished generating
  • stop_generating_clicked: when the "stop generating" button is clicked
  • regenerate_clicked: when the "regenerate" button is clicked
  • send_message: when a message is sent via pressing Enter or clicking the send button
  • session_end: when GPT4All is about to close
  • doc_collection_add: when a LocalDocs collection is successfully added via settings
  • doc_collection_remove: when a LocalDocs collection is removed manually or because the folder was deleted
  • localdocs_indexing_start: when localdocs begins indexing any number of collections
  • localdocs_indexing_complete: when localdocs finishes indexing any number of collections
  • localdocs_folder_indexing: when localdocs begins indexing a folder that actually changed
  • localdocs_folder_complete: when localdocs finishes indexing a folder that actually changed
  • localdocs_startup: when localdocs is ready to start indexing at startup (for number of collections)
  • opt_in: mirrors behavior of opt_out, to compute ratio of opt-ins to opt-outs

Removed events:

  • chat_started (replaced by first property of response_complete)
  • network_toggled (replaced by datalake_active property)

Changed event meanings:

  • startup is now sent immediately after first run dialog is dismissed instead of after ipify is complete and a model is loaded, and will never be sent more than once per session
  • opt_out will never be sent more than once per session
  • model_load is now also sent for the first load event (before we were sending startup)

Changed event properties:

  • all events: added session_id, removed requestedDevice (except for model_load), removed model and actualDevice (except for chat events), time is now in milliseconds instead of seconds
  • chat events: added doc_collections_enabled, doc_collections_total, datalake_active, using_server
  • startup: added $screen_dpi, datalake_active, cpu on Linux and Windows
  • model_load: added $duration, error, model_arch (when unrecognized), cpu_fallback_reason

Other changes:

  • Always display first start dialog if privacy options are unset (e.g. if the user closed GPT4All without selecting them)
  • LocalDocs scanQueue is now always deferred
  • Fix a potential crash in magic_match
  • LocalDocs indexing is now started after the first start dialog is dismissed so usage stats are included

Signed-off-by: Jared Van Bortel <jared@nomic.ai>
Signed-off-by: Jared Van Bortel <jared@nomic.ai>
Signed-off-by: Jared Van Bortel <jared@nomic.ai>
Signed-off-by: Jared Van Bortel <jared@nomic.ai>
Signed-off-by: Jared Van Bortel <jared@nomic.ai>
Signed-off-by: Jared Van Bortel <jared@nomic.ai>
Signed-off-by: Jared Van Bortel <jared@nomic.ai>
Signed-off-by: Jared Van Bortel <jared@nomic.ai>
Signed-off-by: Jared Van Bortel <jared@nomic.ai>
Signed-off-by: Jared Van Bortel <jared@nomic.ai>
Signed-off-by: Jared Van Bortel <jared@nomic.ai>
Signed-off-by: Jared Van Bortel <jared@nomic.ai>
Signed-off-by: Jared Van Bortel <jared@nomic.ai>
Signed-off-by: Jared Van Bortel <jared@nomic.ai>
Signed-off-by: Jared Van Bortel <jared@nomic.ai>
Signed-off-by: Jared Van Bortel <jared@nomic.ai>
Signed-off-by: Jared Van Bortel <jared@nomic.ai>
Signed-off-by: Jared Van Bortel <jared@nomic.ai>
Signed-off-by: Jared Van Bortel <jared@nomic.ai>
Signed-off-by: Jared Van Bortel <jared@nomic.ai>
Signed-off-by: Jared Van Bortel <jared@nomic.ai>
Signed-off-by: Jared Van Bortel <jared@nomic.ai>
Signed-off-by: Jared Van Bortel <jared@nomic.ai>
Signed-off-by: Jared Van Bortel <jared@nomic.ai>
Signed-off-by: Jared Van Bortel <jared@nomic.ai>
Signed-off-by: Jared Van Bortel <jared@nomic.ai>
Signed-off-by: Jared Van Bortel <jared@nomic.ai>
Signed-off-by: Jared Van Bortel <jared@nomic.ai>
Signed-off-by: Jared Van Bortel <jared@nomic.ai>
Signed-off-by: Jared Van Bortel <jared@nomic.ai>
Signed-off-by: Jared Van Bortel <jared@nomic.ai>
Signed-off-by: Jared Van Bortel <jared@nomic.ai>
Otherwise, we will miss a lot of interesting localdocs events the first
time a new version is started.

Signed-off-by: Jared Van Bortel <jared@nomic.ai>
Signed-off-by: Jared Van Bortel <jared@nomic.ai>
Signed-off-by: Jared Van Bortel <jared@nomic.ai>
Signed-off-by: Jared Van Bortel <jared@nomic.ai>
Signed-off-by: Jared Van Bortel <jared@nomic.ai>
Signed-off-by: Jared Van Bortel <jared@nomic.ai>
Signed-off-by: Jared Van Bortel <jared@nomic.ai>
@cebtenzzre cebtenzzre marked this pull request as ready for review April 23, 2024 17:53
Signed-off-by: Jared Van Bortel <jared@nomic.ai>
Signed-off-by: Jared Van Bortel <jared@nomic.ai>
Signed-off-by: Jared Van Bortel <jared@nomic.ai>
Signed-off-by: Jared Van Bortel <jared@nomic.ai>
Signed-off-by: Jared Van Bortel <jared@nomic.ai>
Signed-off-by: Jared Van Bortel <jared@nomic.ai>
Signed-off-by: Jared Van Bortel <jared@nomic.ai>
Signed-off-by: Jared Van Bortel <jared@nomic.ai>
This event needs to be after addChat() so we know if a new chat was actually
added, and it should not use trackChatEvent as it's more of a global UI event
than an event within the current chat.

Signed-off-by: Jared Van Bortel <jared@nomic.ai>
@cebtenzzre cebtenzzre merged commit c622921 into main Apr 25, 2024
6 of 19 checks passed
@cebtenzzre cebtenzzre deleted the improve-mixpanel-stats branch April 25, 2024 17:16
cebtenzzre added a commit that referenced this pull request May 1, 2024
Signed-off-by: Jared Van Bortel <jared@nomic.ai>
cebtenzzre added a commit that referenced this pull request May 1, 2024
Signed-off-by: Jared Van Bortel <jared@nomic.ai>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants