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

Update discoverRootDomain default behaviour #1350

Merged
merged 1 commit into from
Oct 8, 2024

Conversation

jethron
Copy link
Contributor

@jethron jethron commented Oct 4, 2024

In v3, discoverRootDomain was disabled by default, and enabling it meant ignoring the cookieDomain configuration. If neither were set, cookies would have no Domain attribute attached and would bind to the current domain; cookies with no domain are unique in that they do not get shared to subdomains.

In 257ddb3 we updated the discoverRootDomain setting to default to enabled, and changed how it interacted with the cookieDomain setting so that discoverRootDomain is essentially always enabled, but gets ignored if cookieDomain is also specified. This however made it impossible to use the 'no domain' behaviour available in v3, because disabling discoverRootDomain would have no effect without specifying cookieDomain as well.

This can be slightly confusing, so instead, this change allows explicitly disabling discoverRootDomain even if no cookieDomain is specified, allowing the same behaviour as all configurations available in v3.

In v3, `discoverRootDomain` was disabled by default, and enabling it
meant ignoring the `cookieDomain` configuration. If neither were set,
cookies would have no `Domain` attribute attached and would bind to the
current domain; cookies with no domain are unique in that they do not
get shared to subdomains.

In 257ddb3 we updated
the `discoverRootDomain` setting to default to enabled, and changed how it
interacted with the `cookieDomain` setting so that `discoverRootDomain`
is essentially always enabled, but gets ignored if `cookieDomain` is
also specified. This however made it impossible to use the 'no domain'
behaviour available in v3, because disabling `discoverRootDomain` would
have no effect without specifying `cookieDomain` as well.

This can be slightly confusing, so instead, this change allows
explicitly disabling `discoverRootDomain` even if no `cookieDomain` is
specified, allowing the same behaviour as all configurations available
in v3.
Copy link

bundlemon bot commented Oct 4, 2024

BundleMon

Files added (6)
Status Path Size Limits
trackers/javascript-tracker/dist/sp.js
+24.26KB 30KB / +10%
libraries/browser-tracker-core/dist/index.mod
ule.js
+23.42KB 25KB / +10%
libraries/tracker-core/dist/index.module.js
+19.12KB 20KB / +10%
trackers/browser-tracker/dist/index.umd.min.j
s
+17.24KB 20KB / +10%
trackers/javascript-tracker/dist/sp.lite.js
+17.19KB 20KB / +10%
trackers/browser-tracker/dist/index.module.js
+3.49KB 5KB / +10%

Total files change +104.71KB 0%

Final result: ✅

View report in BundleMon website ➡️


Current branch size history

Copy link
Contributor

@matus-tomlein matus-tomlein left a comment

Choose a reason for hiding this comment

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

LGTM!

@jethron jethron merged commit af9992a into snowplow:release/4.0.0 Oct 8, 2024
2 checks passed
@jethron jethron deleted the discover-root-default branch October 8, 2024 23:19
matus-tomlein pushed a commit that referenced this pull request Oct 25, 2024
In v3, `discoverRootDomain` was disabled by default, and enabling it
meant ignoring the `cookieDomain` configuration. If neither were set,
cookies would have no `Domain` attribute attached and would bind to the
current domain; cookies with no domain are unique in that they do not
get shared to subdomains.

In 257ddb3 we updated
the `discoverRootDomain` setting to default to enabled, and changed how it
interacted with the `cookieDomain` setting so that `discoverRootDomain`
is essentially always enabled, but gets ignored if `cookieDomain` is
also specified. This however made it impossible to use the 'no domain'
behaviour available in v3, because disabling `discoverRootDomain` would
have no effect without specifying `cookieDomain` as well.

This can be slightly confusing, so instead, this change allows
explicitly disabling `discoverRootDomain` even if no `cookieDomain` is
specified, allowing the same behaviour as all configurations available
in v3.
@matus-tomlein matus-tomlein mentioned this pull request Oct 25, 2024
matus-tomlein pushed a commit that referenced this pull request Oct 28, 2024
In v3, `discoverRootDomain` was disabled by default, and enabling it
meant ignoring the `cookieDomain` configuration. If neither were set,
cookies would have no `Domain` attribute attached and would bind to the
current domain; cookies with no domain are unique in that they do not
get shared to subdomains.

In 257ddb3 we updated
the `discoverRootDomain` setting to default to enabled, and changed how it
interacted with the `cookieDomain` setting so that `discoverRootDomain`
is essentially always enabled, but gets ignored if `cookieDomain` is
also specified. This however made it impossible to use the 'no domain'
behaviour available in v3, because disabling `discoverRootDomain` would
have no effect without specifying `cookieDomain` as well.

This can be slightly confusing, so instead, this change allows
explicitly disabling `discoverRootDomain` even if no `cookieDomain` is
specified, allowing the same behaviour as all configurations available
in v3.
matus-tomlein pushed a commit that referenced this pull request Oct 28, 2024
In v3, `discoverRootDomain` was disabled by default, and enabling it
meant ignoring the `cookieDomain` configuration. If neither were set,
cookies would have no `Domain` attribute attached and would bind to the
current domain; cookies with no domain are unique in that they do not
get shared to subdomains.

In 257ddb3 we updated
the `discoverRootDomain` setting to default to enabled, and changed how it
interacted with the `cookieDomain` setting so that `discoverRootDomain`
is essentially always enabled, but gets ignored if `cookieDomain` is
also specified. This however made it impossible to use the 'no domain'
behaviour available in v3, because disabling `discoverRootDomain` would
have no effect without specifying `cookieDomain` as well.

This can be slightly confusing, so instead, this change allows
explicitly disabling `discoverRootDomain` even if no `cookieDomain` is
specified, allowing the same behaviour as all configurations available
in v3.
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