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

feat: telemetry using posthog #20825

Merged
merged 6 commits into from
Apr 26, 2023
Merged

feat: telemetry using posthog #20825

merged 6 commits into from
Apr 26, 2023

Conversation

ankush
Copy link
Member

@ankush ankush commented Apr 24, 2023

Adds posthog for collecting minimal site-level info to find out issues blocking adoption.

No individual user is identified and no personal data is collected, only the site is identified as "unique" user.

Summary of change:

  • Collects basic setup wizard events to find where users drop off in setup wizard completion.
  • Users can opt out of telemetry easily:
    • During setup wizard (checkbox provided to opt out)
    • From system settings > telemetry > untick to disable.
    • This is not enabled on existing users.
    • This is not enabled if site config doesn't contain configuration for telemetry (posthog hostname and project id)

WARNING: This is experimental and should be treated "internal", anything or everything in this PR is subjected to change or get removed without any warning.

no-docs

@github-actions github-actions bot added the add-test-cases Add test case to validate fix or enhancement label Apr 24, 2023
@WebsiteDeveloper

This comment was marked as resolved.

@codecov
Copy link

codecov bot commented Apr 24, 2023

Codecov Report

Merging #20825 (db4cd1a) into develop (e6279e0) will decrease coverage by 0.08%.
The diff coverage is 60.41%.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #20825      +/-   ##
===========================================
- Coverage    63.95%   63.88%   -0.08%     
===========================================
  Files          759      761       +2     
  Lines        68789    68844      +55     
  Branches      6219     6224       +5     
===========================================
- Hits         43997    43983      -14     
- Misses       21275    21323      +48     
- Partials      3517     3538      +21     
Flag Coverage Δ
server 68.91% <77.77%> (-0.01%) ⬇️
server-ui 32.15% <35.48%> (+0.01%) ⬆️
ui-tests 51.64% <41.17%> (-0.17%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

@ankush
Copy link
Member Author

ankush commented Apr 24, 2023

@WebsiteDeveloper yeah we will make it configurable. This is rough PR, ignore for now.

@WebsiteDeveloper
Copy link
Contributor

Alright :) just saw it. Did not notice it got opened like 30 mins ago

@ankush ankush removed the add-test-cases Add test case to validate fix or enhancement label Apr 25, 2023
@ankush ankush force-pushed the posthog_poc branch 2 times, most recently from 706746d to 6e3352a Compare April 25, 2023 07:29
@ankush ankush added the defer backport Backports for some PR are deferred for a week or two to test them properly before releasing label Apr 25, 2023
@ankush ankush marked this pull request as ready for review April 25, 2023 09:05
@ankush ankush requested review from a team and shariquerik and removed request for a team April 25, 2023 09:05
@ankush ankush removed the request for review from shariquerik April 25, 2023 09:33
@ankush ankush merged commit 7042dca into frappe:develop Apr 26, 2023
15 of 16 checks passed
@ankush ankush deleted the posthog_poc branch April 26, 2023 10:24
@ankush ankush added backport version-14-hotfix backport to version 14 and removed defer backport Backports for some PR are deferred for a week or two to test them properly before releasing labels May 8, 2023
ankush added a commit that referenced this pull request May 8, 2023
* feat: let users disable telemetry from system settings

(cherry picked from commit 0d1c7fe)

# Conflicts:
#	frappe/core/doctype/system_settings/system_settings.json

* feat: telemetry using posthog

(cherry picked from commit 87a8819)

* feat: setup wizard progress telemetry

(cherry picked from commit 6c3f29e)

* feat: add python posthog library

(cherry picked from commit f63c420)

# Conflicts:
#	pyproject.toml

* feat: let user opt out of telemetry from setup

(cherry picked from commit 93c326b)

# Conflicts:
#	frappe/core/doctype/system_settings/system_settings.json

* refactor: reduce duplication

(cherry picked from commit db4cd1a)

* chore: conflicts

* chore: track onboarding progress

Easy self-onboarding has been hardest to get right in complex business
apps, even though we have worked on this for long long time we have no
clear idea on how well it works, or if it's severly lacking.

We want to improve this by first understanding how efficient current
system is.

This PR adds basic telemetry for which steps are being completed, which
are skipped and what onboarding group is dismissed completely.

* Revert "chore: conflicts"

This reverts commit 39e5751.

* chore: conflicts

---------

Co-authored-by: Ankush Menat <ankush@frappe.io>
frappe-pr-bot pushed a commit that referenced this pull request May 9, 2023
# [14.36.0](v14.35.0...v14.36.0) (2023-05-09)

### Bug Fixes

* ensure that `get_last_email` returns the most recent email (backport [#20711](#20711)) ([624f96b](624f96b))
* escape html from listview row title ([56bec1d](56bec1d))
* escape html from workspace title ([e68fc43](e68fc43))
* ignore virtual doctypes during data export ([#20891](#20891)) ([#20899](#20899)) ([d6bfaae](d6bfaae))
* make operator in link filters translatable (backport [#20884](#20884)) ([#20911](#20911)) ([1ec3bad](1ec3bad))
* message.py executing script ([#20887](#20887)) ([#20897](#20897)) ([1bcf5d4](1bcf5d4))
* **multi-pdf:** change response type to pdf ([997559c](997559c))
* **oauth:** add exp to idToken ([#20694](#20694)) ([#20903](#20903)) ([1a8e671](1a8e671))
* reload communication before re-save ([#20914](#20914)) ([#20921](#20921)) ([37a8ec0](37a8ec0))
* set default letterhead and print format ([a5a6965](a5a6965))
* strip comma, space from recipients before sending email for auto repeat ([#20940](#20940)) ([#20945](#20945)) ([042a1d2](042a1d2))
* translate lowercase operators to german ([#20912](#20912)) ([#20916](#20916)) ([c47b146](c47b146))
* type hints for get_address_display ([#20923](#20923)) ([#20924](#20924)) ([15df963](15df963))
* use smaller font only if the report doesnt have a standard print format ([#20878](#20878)) ([#20947](#20947)) ([35165d0](35165d0))

### Features

* helper method for address display ([#20900](#20900)) ([#20901](#20901)) ([f914770](f914770))
* telemetry using posthog (backport [#20825](#20825)) ([#20934](#20934)) ([bbe29ee](bbe29ee))

### Performance Improvements

* get all file data at once when downloading private file ([#20902](#20902)) ([e106594](e106594))
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport version-14-hotfix backport to version 14
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants