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

[PLAT-5050] Add anonymous device ID #1072

Merged
merged 2 commits into from
Oct 1, 2020
Merged

[PLAT-5050] Add anonymous device ID #1072

merged 2 commits into from
Oct 1, 2020

Conversation

imjoehaines
Copy link
Contributor

Goal

Record an anonymous ID which persists across events & sessions

Changeset

  • add a new config option "generateAnonymousId" to core (defaults to true)
  • if "generateAnonymousId" is enabled, the browser device plugin will now generate an anonymous ID and store it in local storage. This will be added to all subsequent events & sessions. If persistence fails, the ID will not be sent

Testing

Unit tests and additions to the browser device E2E tests

@bugsnagbot
Copy link
Collaborator

bugsnagbot commented Sep 28, 2020

@bugsnag/browser bundle size diff

Minified Minfied + Gzipped
Before 39.62 kB 12.23 kB
After 40.57 kB 12.52 kB
± ⚠️ +954 bytes ⚠️ +285 bytes

Generated by 🚫 dangerJS against 8e2c43f

@imjoehaines imjoehaines marked this pull request as ready for review September 28, 2020 16:48
@imjoehaines imjoehaines requested a review from a team as a code owner September 28, 2020 16:48
Copy link
Contributor

@bengourley bengourley left a comment

Choose a reason for hiding this comment

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

One comment that might trim a few bytes, otherwise implementation looks good.

packages/plugin-browser-device/device.js Outdated Show resolved Hide resolved
@imjoehaines imjoehaines force-pushed the anonymous-device-id branch 2 times, most recently from 53687b0 to 96a13c3 Compare September 30, 2020 13:53
@imjoehaines imjoehaines merged commit 2e05394 into next Oct 1, 2020
@imjoehaines imjoehaines deleted the anonymous-device-id branch October 1, 2020 08:20
@imjoehaines imjoehaines mentioned this pull request Oct 1, 2020
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.

3 participants