Hello π
I've noticed this problem when I needed to migrate client-side tracking from one cookie name to another one. It doesn't work.
There is cookie.oldKey settings parameter available for the User module:
|
cookie?: { |
|
key?: string |
|
oldKey?: string |
|
} |
But, it seems, it doesn't do anything. In both cases, when the code checks for "old" data stored with the "old key", it uses defaults.cookie.oldKey (which is a module-level static const) instead of options.cookie.oldKey.
See:
|
const retLeg = this.legacyUserStore.get(defaults.cookie.oldKey) |
|
const legacyUser = this.legacyUserStore.get(defaults.cookie.oldKey) |
I'll be happy to provide a PR to fix it, if anyone confirms this is indeed a bug and not a feature :)
Hello π
I've noticed this problem when I needed to migrate client-side tracking from one cookie name to another one. It doesn't work.
There is
cookie.oldKeysettings parameter available for the User module:analytics-next/packages/browser/src/core/user/index.ts
Lines 26 to 29 in 235ddf9
But, it seems, it doesn't do anything. In both cases, when the code checks for "old" data stored with the "old key", it uses
defaults.cookie.oldKey(which is a module-level static const) instead ofoptions.cookie.oldKey.See:
analytics-next/packages/browser/src/core/user/index.ts
Line 134 in 235ddf9
analytics-next/packages/browser/src/core/user/index.ts
Line 107 in 235ddf9
I'll be happy to provide a PR to fix it, if anyone confirms this is indeed a bug and not a feature :)