Skip to content

Commit

Permalink
fix: posthog alias mapping swap (#3765)
Browse files Browse the repository at this point in the history
* fix: posthog swapped alias ids (#3507)

[Posthog] fix swapped alias ids

Co-authored-by: shrouti1507 <[email protected]>

* fix: test case update for posthog

---------

Co-authored-by: Marc Jeffrey <[email protected]>
  • Loading branch information
shrouti1507 and mjeffrey18 authored Sep 30, 2024
1 parent 173b989 commit b6240d0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/v0/destinations/posthog/data/PHAliasConfig.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[
{
"destKey": "properties.alias",
"destKey": "properties.distinct_id",
"sourceKeys": "userId",
"sourceFromGenericMap": true,
"required": true
},
{
"destKey": "properties.distinct_id",
"destKey": "properties.alias",
"sourceKeys": "previousId",
"required": true
},
Expand Down
4 changes: 2 additions & 2 deletions test/integrations/destinations/posthog/processor/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export const data = [
$ip: '0.0.0.0',
$timestamp: '2020-11-04T13:21:09.712Z',
$anon_distinct_id: 'f3cf54d8-f237-45d2-89f7-ccd70d42cf31',
distinct_id: 'prevId_1',
distinct_id: 'uid-1',
$device_manufacturer: 'Xiaomi',
$os_version: '8.1.0',
$app_version: '1.1.7',
Expand All @@ -84,7 +84,7 @@ export const data = [
$device_model: 'Redmi 6',
$app_namespace: 'com.rudderlabs.javascript',
$app_build: '1.0.0',
alias: 'uid-1',
alias: 'prevId_1',
},
timestamp: '2020-11-04T13:21:09.712Z',
event: '$create_alias',
Expand Down
4 changes: 2 additions & 2 deletions test/integrations/destinations/posthog/router/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export const data = [
$ip: '0.0.0.0',
$timestamp: '2020-11-04T13:21:09.712Z',
$anon_distinct_id: 'f3cf54d8-f237-45d2-89f7-ccd70d42cf31',
distinct_id: 'prevId_1',
distinct_id: 'uid-1',
$device_manufacturer: 'Xiaomi',
$os_version: '8.1.0',
$app_version: '1.1.7',
Expand All @@ -89,7 +89,7 @@ export const data = [
$device_model: 'Redmi 6',
$app_namespace: 'com.rudderlabs.javascript',
$app_build: '1.0.0',
alias: 'uid-1',
alias: 'prevId_1',
},
timestamp: '2020-11-04T13:21:09.712Z',
event: '$create_alias',
Expand Down

0 comments on commit b6240d0

Please sign in to comment.