유저ID 시나리오별 기기 태그 변화
기기와 유저 태그는 별개로 움직이며 유저ID 연동 시나리오에 따라 고객 데이터가 의도치 않게 덮어쓰이지 않도록 다음과 같은 정책을 사용하고 있습니다.
신규 설정 (null -> User A)
Section titled “신규 설정 (null -> User A)”User A가 존재하지 않으면 현재 기기의 태그가 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" }}User A가 이미 존재하는 경우 User A가 갖고 있지 않은 태그만 복사
// 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" }}유저 변경 (User A -> User B)
Section titled “유저 변경 (User A -> User B)”User B가 존재하지 않으면 User A 태그를 복사하지 않고 모두 리셋
// 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: {}}User B가 존재하면 어떠한 복사 없이 User B의 프로필로 모두 변경
// 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", }}설정 해지 (User A -> null)
Section titled “설정 해지 (User A -> null)”현재 기기의 태그 모두 리셋
// Before
Device (User A){ tags: { "tag1": "1", "tag2": "2", "tag3": "3" }}// After .setUserId(null)
Device (Anonymous){ tags: {}}