Skip to content

Add functionality to set the Network User Id #1236

@RobertJamesEllison

Description

@RobertJamesEllison

Is your feature request related to a problem? Please describe.
I need to set my own Network User ID. The advantages of setting a seperate value is that it is one defined by the platform to give a common anonymous user ID. This way different tools can have a same user definition.
Another major advantage is guarding against Apple ITP resetting the user ID on every return visit.
The collector cookie (Network user ID) is designed to solve this but another difficulty is that we use an API gateway that is on a seperate domain to our customer facing sites. If we did get the header cookie to be forwarded it would not resolve our issue.

Describe the solution you'd like
A new function setNetworkUserId and/or setNetworkUserIdFromCookie that sets the tnuid value in the tracker protocol.

Describe alternatives you've considered
Setting a new custom context including the value. The main disadvantages with this are:

  1. We would need to do this everywhere with every request adding unnecessary bloat to the payload and making for a more complex implementation for all FE engineers.
  2. The data is less accessible and something this important should be available on root level.

Additional context
The tracker protocol offers a network user override here. It would make sense give the option to use this.

Metadata

Metadata

Assignees

Labels

type:enhancementNew features or improvements to existing features.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions