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

add session key to boomr object #22

Conversation

andreas-marschke
Copy link
Collaborator

Fixes Cannot set domain of undefined error in BOOMR.init

Fixes `Cannot set domain of undefined` error in BOOMR.init
session: {
// You can disable all cookies by setting site_domain to a falsy value
domain: null,
ID: Math.random().toString(36).replace(/^0\./, ""),
Copy link
Owner

Choose a reason for hiding this comment

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

let's change this to use a proper UUID, there's a very high chance of collision with just Math.random. This code will do it:
(function b(a){return a?(a^Math.random()*16>>a/4).toString(16):([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,b)})()

Explanation is here: https://gist.github.com/jed/982883

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done

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