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(web-analytics): Add flag to send server hash instead of distinct id #1490

Merged
merged 20 commits into from
Dec 16, 2024

Conversation

robbie-c
Copy link
Member

@robbie-c robbie-c commented Oct 23, 2024

Changes

Part of PostHog/posthog#25117
Main repo PR (currently WIP, this PR can be merged before that one) PostHog/posthog#25915

Everything is behind a config option with a dire warning, so this doesn't need to be final.

Checklist

  • Tests for new code (see advice on the tests we use)
  • Accounted for the impact of any changes across different browsers
  • Accounted for backwards compatibility of any changes (no breaking changes in posthog-js!)

Copy link

vercel bot commented Oct 23, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
posthog-js ✅ Ready (Inspect) Visit Preview Dec 13, 2024 1:19pm

Copy link

github-actions bot commented Oct 23, 2024

Size Change: +8.99 kB (+0.28%)

Total Size: 3.22 MB

Filename Size Change
dist/all-external-dependencies.js 206 kB +7 B (0%)
dist/array.full.es5.js 262 kB +901 B (+0.35%)
dist/array.full.js 365 kB +901 B (+0.25%)
dist/array.full.no-external.js 364 kB +901 B (+0.25%)
dist/array.js 179 kB +894 B (+0.5%)
dist/array.no-external.js 178 kB +894 B (+0.5%)
dist/main.js 180 kB +894 B (+0.5%)
dist/module.full.js 365 kB +901 B (+0.25%)
dist/module.full.no-external.js 364 kB +901 B (+0.25%)
dist/module.js 179 kB +894 B (+0.5%)
dist/module.no-external.js 178 kB +894 B (+0.5%)
dist/tracing-headers.js 1.76 kB +7 B (+0.4%)
ℹ️ View Unchanged
Filename Size
dist/customizations.full.js 12.6 kB
dist/dead-clicks-autocapture.js 14.4 kB
dist/exception-autocapture.js 9.48 kB
dist/external-scripts-loader.js 2.48 kB
dist/recorder-v2.js 115 kB
dist/recorder.js 115 kB
dist/surveys-preview.js 57.6 kB
dist/surveys.js 63.3 kB
dist/web-vitals.js 10.4 kB

compressed-size-action

@posthog-bot
Copy link
Collaborator

This PR hasn't seen activity in a week! Should it be merged, closed, or further worked on? If you want to keep it open, post a comment or remove the stale label – otherwise this will be closed in another week.

@posthog-bot
Copy link
Collaborator

This PR hasn't seen activity in a week! Should it be merged, closed, or further worked on? If you want to keep it open, post a comment or remove the stale label – otherwise this will be closed in another week.

@posthog-bot
Copy link
Collaborator

This PR was closed due to lack of activity. Feel free to reopen if it's still relevant.

@robbie-c robbie-c marked this pull request as ready for review December 12, 2024 13:52
Copy link
Collaborator

@benjackwhite benjackwhite left a comment

Choose a reason for hiding this comment

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

Small comments - although intrigued about the server side given I wasn't much aware of this 😅

src/extensions/replay/sessionrecording.ts Outdated Show resolved Hide resolved
src/posthog-core.ts Outdated Show resolved Hide resolved
Copy link
Member

@rafaeelaudibert rafaeelaudibert left a comment

Choose a reason for hiding this comment

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

lgtm

* PREVIEW - MAY CHANGE WITHOUT WARNING - DO NOT USE IN PRODUCTION
* Sentinel value for distinct id, device id, session id. Signals that the server should generate the value
* */
export const COOKIELESS_SENTINEL_VALUE = '$posthog_cklsh'
Copy link
Member

Choose a reason for hiding this comment

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

Idea for the future: store this kind of cross-repo setting in a global store to avoid them getting out of sync

@robbie-c robbie-c added the bump patch Bump patch version when this PR gets merged label Dec 16, 2024
@robbie-c robbie-c merged commit e0c85ee into main Dec 16, 2024
13 checks passed
@robbie-c robbie-c deleted the feat/cooklieless-server-hash branch December 16, 2024 11:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bump patch Bump patch version when this PR gets merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants