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

Web analytics #3166

Merged
merged 27 commits into from Sep 4, 2023
Merged

Web analytics #3166

merged 27 commits into from Sep 4, 2023

Conversation

jprochazk
Copy link
Member

@jprochazk jprochazk commented Aug 31, 2023

What

Part of #2966

  • Enable analytics on the web with the same events as native viewer
    • Events have a wasm32-unknown-unknown target, and have the url set to the string value of window.location
  • Expose set_email global function when running on the web
    • Used to identify Rerun employees in the same way as rerun analytics email <email@rerun.io>
  • Disable analytics if the web viewer is running in the context of a notebook
    • To detect it, we set the notebook=1 query param on the iframe

Checklist

@jprochazk jprochazk mentioned this pull request Aug 30, 2023
7 tasks
@jprochazk jprochazk added 🕸️ web regarding running the viewer in a browser 📊 analytics telemetry analytics labels Aug 31, 2023
@jprochazk jprochazk marked this pull request as ready for review September 1, 2023 08:26
@emilk
Copy link
Member

emilk commented Sep 1, 2023

Expose set_email global function when running on the web

We should document how to run this, and who should run this. rerun analytics email is currently documented here, so I guess it makes sense to document set_email in the same place (no need to make it public, even though it is hardly a secret)

Copy link
Member

@emilk emilk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! But we really need to limit what urls we send to analytics 😬

crates/re_analytics/src/lib.rs Outdated Show resolved Hide resolved
crates/re_analytics/src/lib.rs Outdated Show resolved Hide resolved
crates/re_analytics/src/web/config.rs Outdated Show resolved Hide resolved
crates/re_analytics/src/lib.rs Outdated Show resolved Hide resolved
crates/re_analytics/src/lib.rs Outdated Show resolved Hide resolved
crates/re_analytics/src/web/config.rs Outdated Show resolved Hide resolved
crates/re_viewer/src/viewer_analytics.rs Outdated Show resolved Hide resolved
crates/re_viewer/src/app.rs Outdated Show resolved Hide resolved
scripts/ci/demo_assets/static/index.js Show resolved Hide resolved
crates/re_viewer/src/web.rs Show resolved Hide resolved
@jprochazk
Copy link
Member Author

rerun analytics email is currently documented here, so I guess it makes sense to document set_email in the same place

Yeah, I wasn't sure where exactly to put it. I updated the document.

@jprochazk jprochazk requested a review from emilk September 1, 2023 11:20
crates/re_viewer/src/viewer_analytics.rs Show resolved Hide resolved
crates/re_viewer/src/viewer_analytics.rs Outdated Show resolved Hide resolved
@jprochazk jprochazk merged commit 21538b4 into main Sep 4, 2023
26 checks passed
@jprochazk jprochazk deleted the jan/web-analytics branch September 4, 2023 07:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📊 analytics telemetry analytics 🕸️ web regarding running the viewer in a browser
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants