Skip to content

feat: Show warning if identifying with "distinct_id" - #918

Merged
benjackwhite merged 2 commits into
masterfrom
feat/disallow-distinct_id
Dec 5, 2023
Merged

benjackwhite merged 2 commits into
masterfrom
feat/disallow-distinct_id

Conversation

@benjackwhite

Copy link
Copy Markdown
Contributor

Changes

Came across enough cases of this in support that I figured it was worth making this not possible. We document all over the place "distinct_id" and many people for sure just copy and paste...

Checklist

Comment thread src/posthog-core.ts
}

if (isDistinctIdStringLike(new_distinct_id)) {
logger.critical(

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

#lazyweb does the logger critical show even with debug false?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Indeed. Figured it was "critical" in the sense that I want people to see the error even if they don't have debug mode on

@github-actions

github-actions Bot commented Dec 4, 2023

Copy link
Copy Markdown
Contributor

Size Change: +889 B (0%)

Total Size: 745 kB

Filename Size Change
dist/array.full.js 176 kB +223 B (0%)
dist/array.js 117 kB +222 B (0%)
dist/es.js 118 kB +222 B (0%)
dist/module.js 118 kB +222 B (0%)
ℹ️ View Unchanged
Filename Size
dist/exception-autocapture.js 12 kB
dist/recorder-v2.js 104 kB
dist/recorder.js 58.4 kB
dist/surveys.js 41.5 kB

compressed-size-action

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.

2 participants