Change default tracker initialization parameters for JS/Browser v4 - #1144
Conversation
BundleMonFiles added (6)
Total files change +90.88KB 0% Final result: ✅ View report in BundleMon website ➡️ |
Matus Tomlein (matus-tomlein)
left a comment
There was a problem hiding this comment.
LGTM, nice change! 👍
I can't comment in the file directly, but can you fix the API comments in the types.ts file? It still says that the default for discoverRootDomain is false and for cookieSameSite is None.
|
Sure thanks! |
|
On However, I do see the benefit in making the default cookie domain the root... maybe we can try and find it another way - trim |
|
Paul Boocock (@paulboocock) |
ecd050c to
9ba4395
Compare
579acd6 to
4ea6b1f
Compare
Addressed at #1163 |
9ba4395 to
8fe93d8
Compare
This PR includes the proposed changes for the JS/Browser tracker initialization parameters:
Currently it includes:
discoverRootDomain: The default becomestrueconfigCookieSameSite: The default becomesLaxA bit more info:
discoverRootDomainOn the previous version this value defaulted to
false.This had an important effect when used as a default. If the tracker was installed in a subdomain (foo.example.com), or any number of subdomains (bar.example.com etc), and a TLD (example.com), then all instances had different domain userIds.
That would make the analysis a bit more challenging when trying to count unique users, without the existance of user ID (
uid), and cross TLD-subdomain behaviours/attribution.The behaviour now mimics what other tools like Google Analytics have as a default.
configCookieSameSiteThis was set as the recommended value of
Laxbut defaults toNonewhich seems to have caused some issues for unsupported browsers and tracking use cases.Since our v4 compatibility does not allow us to follow the changes made in latest browser versions, this would be a good default to follow for this version:
More info: