project Websites / Privacy Sensitive Analytics avatar

Websites / Privacy Sensitive Analytics: 03c30497




Move to a 1:3 chance of a session ID rotating (websites/privacy-sensitive-analytics#17)

Move to a 1:3 chance of a session ID rotating (websites/privacy-sensitive-analytics#17)

This decreases certainty about whether two seperate writes are related.

Commit 03c30497.

Authored 2022-04-07T16:22:13.000+01:00 by B Tasker in project Websites / Privacy Sensitive Analytics

+2 lines -2 lines

Commit Signature

Changes

diff --git a/agent/agent.js b/agent/agent.js
--- a/agent/agent.js
+++ b/agent/agent.js
# @@ -88,7 +88,7 @@ function getSessionId(){
# }
#
# // Every so often, we want to rotate the session ID to mitigate its impact
# - var n = randomInteger(1, 10);
# + var n = randomInteger(1, 3);
#
# var k = window.location.hostname + "_sess-id";
# var i = sessionStorage.getItem(k);
# @@ -102,7 +102,7 @@ function getSessionId(){
# * a 1:10 random chance
# *
# */
# - if (!i || !c || c > window.max_session_usage || n == 5){
# + if (!i || !c || c > window.max_session_usage || n == 3){
# i = createUUID();
# c = 0;
# }
#