Skip to content

Commit

Permalink
chore(core): include user agent and screen density in telemetry calls (
Browse files Browse the repository at this point in the history
…#5568)

* fix(validation): update min and max to include string for dates (#5555)

* fix(core): wait for duplicate success before navigating (#5556)

* chore(core): include user agent and screen density in telemetry calls

Signed-off-by: Fred Carlsen <[email protected]>

---------

Signed-off-by: Fred Carlsen <[email protected]>
Co-authored-by: Rico Kahler <[email protected]>
  • Loading branch information
sjelfull and ricokahler authored Jan 29, 2024
1 parent ff3d625 commit 8a166bd
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions packages/sanity/src/core/studio/StudioTelemetryProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,14 @@ export function StudioTelemetryProvider(props: {children: ReactNode; config: Con

useEffect(() => {
store.logger.updateUserProperties({
userAgent: navigator.userAgent,
screen: {
density: window.devicePixelRatio,
height: window.screen.height,
width: window.screen.width,
innerHeight: window.innerHeight,
innerWidth: window.innerWidth,
},
studioVersion: SANITY_VERSION,
plugins: arrify(props.config).flatMap(
(config) =>
Expand Down

2 comments on commit 8a166bd

@vercel
Copy link

@vercel vercel bot commented on 8a166bd Jan 29, 2024

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

performance-studio – ./

performance-studio-git-next.sanity.build
performance-studio.sanity.build

@vercel
Copy link

@vercel vercel bot commented on 8a166bd Jan 29, 2024

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

test-studio – ./

test-studio.sanity.build
test-studio-git-next.sanity.build

Please sign in to comment.