How Device Tags Change by User ID Scenario
Device tags and user tags operate independently. To prevent customer data from being unintentionally overwritten across different User ID scenarios, FlareLane applies the following policies.
New assignment (null -> User A)
Section titled “New assignment (null -> User A)”If User A does not exist, all tags on the current device are also copied to User A
// Before
Device (Anonymous){ tags: { "tag1": "1", "tag2": "2", "tag3": "3" }}
User A not exists// After .setUserId("User A")
Device (User A){ tags: { "tag1": "1", "tag2": "2", "tag3": "3" }}
User A{ tags: { "tag1": "1", "tag2": "2", "tag3": "3" }}If User A already exists, only the tags that User A does not already have are copied
// Before
Device (Anonymous){ tags: { "tag1": "1", "tag2": "2", "tag3": "3" }}
User A{ tags: { "tag1": "A", "tag2": "B", }}// After .setUserId("User A")
Device (User A){ tags: { "tag1": "A", "tag2": "B", "tag3": "3" }}
User A{ tags: { "tag1": "A", "tag2": "B", "tag3": "3" }}Switching users (User A -> User B)
Section titled “Switching users (User A -> User B)”If User B does not exist, User A's tags are not copied and everything is reset
// Before
Device (User A){ tags: { "tag1": "1", "tag2": "2", "tag3": "3" }}
User B not exists// After .setUserId("User B")
Device (User B){ tags: {}}
User B{ tags: {}}If User B exists, everything switches to User B's profile with no copying
// Before
Device (User A){ tags: { "tag1": "1", "tag2": "2", "tag3": "3" }}
User B{ tags: { "tag1": "A", }}// After .setUserId("User B")
Device (User B){ tags: { "tag1": "A" }}
User B{ tags: { "tag1": "A", }}Clearing the assignment (User A -> null)
Section titled “Clearing the assignment (User A -> null)”All tags on the current device are reset
// Before
Device (User A){ tags: { "tag1": "1", "tag2": "2", "tag3": "3" }}// After .setUserId(null)
Device (Anonymous){ tags: {}}