Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: klaviyo remove duplicate profile due anonymousId mapped to external_id #3440

Closed
wants to merge 1 commit into from

Conversation

anantjain45823
Copy link
Contributor

What are the changes introduced in this PR?

For klaviyo destination, anonymous events (no userId), we are mapping the main identifier on klaviyo side, external_id, with anonymousId and once we get identify event for the same user we are mapping userId to external_id leading to duplicating profiles. Klaviyo has a parameter as anonymous_id which helps to track anonymous user, and once user is identified, it we can send both external_id mapped to userId and anonymous_id mapped to anonymousId to merge the profiles. Hence, avoiding creation of duplicate profiles.
This PR resolves this issue by mapping only userId to the external_id parameter and mapping anonymousId to anonymous_id always.

What is the related Linear task?

Resolves INT-2185

Please explain the objectives of your changes below

Put down any required details on the broader aspect of your changes. If there are any dependent changes, mandatorily mention them here

Any changes to existing capabilities/behaviour, mention the reason & what are the changes ?

N/A

Any new dependencies introduced with this change?

N/A

Any new generic utility introduced or modified. Please explain the changes.

N/A

Any technical or performance related pointers to consider with the change?

N/A

@coderabbitai review


Developer checklist

  • My code follows the style guidelines of this project

  • No breaking changes are being introduced.

  • All related docs linked with the PR?

  • All changes manually tested?

  • Any documentation changes needed with this change?

  • Is the PR limited to 10 file changes?

  • Is the PR limited to one linear task?

  • Are relevant unit and component test-cases added in new readability format?

Reviewer checklist

  • Is the type of change in the PR title appropriate as per the changes?

  • Verified that there are no credentials or confidential data exposed with the changes.

@anantjain45823 anantjain45823 self-assigned this Jun 5, 2024
@anantjain45823 anantjain45823 requested review from a team and sivashanmukh as code owners June 5, 2024 04:21
@devops-github-rudderstack
Copy link
Contributor

@utsabc
Copy link
Member

utsabc commented Jun 5, 2024

Can you share some details about backward compatibility?

  • Klaviyo uses multiple identifiers - email, phone, userId

How does this change correlates when combination of above identifiers is present along with anonymousId?

Copy link

sonarqubecloud bot commented Jun 5, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

Copy link

codecov bot commented Jun 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.01%. Comparing base (cd0b81b) to head (e10099e).
Report is 3 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #3440   +/-   ##
========================================
  Coverage    88.01%   88.01%           
========================================
  Files          569      569           
  Lines        30634    30636    +2     
  Branches      7323     7325    +2     
========================================
+ Hits         26961    26963    +2     
  Misses        3366     3366           
  Partials       307      307           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@anantjain45823
Copy link
Contributor Author

Can you share some details about backward compatibility?

  • Klaviyo uses multiple identifiers - email, phone, userId

How does this change correlates when combination of above identifiers is present along with anonymousId?

Whatever identifier mapping we were doing previously that is done currently as well. The change we have done is to remove anonymousId as one those identifiers which was previously the case.
For backward comptibility, it is not.
We will now start tracking the anonymous users and identified users with same anonymousId as one and not different duplicates which I think should not be a breaking change.
But just in case we can drive it via some config option as well. WDYT @utsabc would be best approach for this ?

@anantjain45823
Copy link
Contributor Author

Closing this PR as anonymous_id is not supported in the current version klaviyo used by rudderstack 15-02-2023. Intial Testing was done with latest klaviyo version 15-05-2024 which supports anonymous_id

@devops-github-rudderstack devops-github-rudderstack deleted the fix.KlaviyoDuplicateProfile branch September 6, 2024 02:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants