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

Investigate different domain_userid having the same domain_sessionid #442

Closed
bogaert opened this issue Dec 14, 2015 · 2 comments
Closed

Comments

@bogaert
Copy link

bogaert commented Dec 14, 2015

We found one case (a client using JS-tracker 1.5.2) where the number of distinct domain_sessionid is between 50 to 100% higher than the number of domain_userid || domain_sessionidx.

It appears that this is driven by different domain_userid (often on different domains) having the same domain_sessionid.

In SQL:

SELECT
domain_sessionid,
COUNT(DISTINCT domain_userid || domain_sessionidx) AS user_sessionidx,
COUNT(DISTINCT domain_userid)
FROM atomic.events
GROUP BY 1
ORDER BY 2 DESC
LIMIT 50

Needs to be investigated further.

@fblundun
Copy link
Contributor

One idea we investigated: that the UUID generation was not generated sufficiently randomly. We use the standard Node UUID library. If it fails to find window.crypto.getRandomValues or window.msCrypto.getRandomValues, it will fall back on Math.random which is not guaranteed to return unique values.

This compatibility chart has information about which browsers support getRandomValues. Chrome for Android apparently does support it, but the problem of duplicated domain_sessionid sometimes appears for Chrome for Android. So falling back on Math.random doesn't explain this.

@paulboocock
Copy link
Contributor

Closing in favour of #499

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

No branches or pull requests

3 participants