Skip to content

Commit

Permalink
fix: edited distinct id logic
Browse files Browse the repository at this point in the history
  • Loading branch information
shrouti1507 committed Nov 16, 2023
1 parent 9271f11 commit c0ac630
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/v0/destinations/mp/transform.js
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,11 @@ const createSetOnceResponse = (message, type, destination, setOnce) => {
$token: destination.Config.token,
$distinct_id: message.userId || message.anonymousId,
};

if (destination?.Config.identityMergeApi === 'simplified') {
payload.$distinct_id = message.userId || `$device:${message.anonymousId}`;
}

return responseBuilderSimple(payload, message, type, destination.Config);
};

Expand Down

0 comments on commit c0ac630

Please sign in to comment.