`user.cookie.oldKey` setting doesn't do anything
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:
https://github.com/segmentio/analytics-next/blob/235ddf9080423f40393b0e6fb47588bb8bb42ab3/packages/browser/src/core/user/index.ts#L26-L29
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:
https://github.com/segmentio/analytics-next/blob/235ddf9080423f40393b0e6fb47588bb8bb42ab3/packages/browser/src/core/user/index.ts#L134
https://github.com/segmentio/analytics-next/blob/235ddf9080423f40393b0e6fb47588bb8bb42ab3/packages/browser/src/core/user/index.ts#L107
I'll be happy to provide a PR to fix it, if anyone confirms this is indeed a bug and not a feature :)