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: Add cookieless server hash mode #25915

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

robbie-c
Copy link
Member

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

Problem

WIP

Changes

WIP

Allow posthog-js to pass a sentinel value for distinct id, session id, and device id, which will get converted to actual values server-side based on a hash of some properties that are included with the request (e.g. user agent, ip address, etc)

Does this work well for both Cloud and self-hosted?

Yes

How did you test this code?

TODO

event.properties['$device_id'] = hashValue

// TRICKY: if a user were to log in and out, to avoid collisions, we would want a different hash value, so we store the set of identify event uuids for identifies
// ASSUMPTION: all events are processed in order, and are processed exactly once
Copy link
Member Author

Choose a reason for hiding this comment

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

this assumption doesn't hold, events are at least once, so we need to be able to deal with the same identify event happening twice

@posthog-bot
Copy link
Contributor

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. If you want to permanentely keep it open, use the waiting label.

@posthog-bot posthog-bot removed the stale label Nov 18, 2024
@posthog-bot
Copy link
Contributor

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. If you want to permanentely keep it open, use the waiting label.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants