Skip to content

Commit

Permalink
feat(packages/sui-segment-wrapper): send version always
Browse files Browse the repository at this point in the history
  • Loading branch information
kikoruiz committed Nov 25, 2024
1 parent 12fff81 commit 8caf104
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 1 addition & 2 deletions packages/sui-segment-wrapper/src/segmentWrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ export const decorateContextWithNeededData = async ({event = '', context = {}})
getTrackIntegrations({gdprPrivacyValue, event}),
getXandrId({gdprPrivacyValueAdvertising})
])
const version = process.env.VERSION

if (!isGdprAccepted) {
context.integrations = {
Expand All @@ -148,7 +147,7 @@ export const decorateContextWithNeededData = async ({event = '', context = {}})
...context.integrations,
...integrations
},
clientVersion: `segment-wrapper${version ? `@${version}` : ''}`
clientVersion: `segment-wrapper@${process.env.VERSION ?? '0.0.0'}`
}
}

Expand Down
3 changes: 2 additions & 1 deletion packages/sui-segment-wrapper/test/segmentWrapperSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -755,7 +755,8 @@ describe('Segment Wrapper', function () {
gdpr_privacy_advertising: 'declined',
context: {
integrations
}
},
clientVersion: '[email protected]'
}
const {traits} = spy.getCall(0).firstArg.obj.context

Expand Down

0 comments on commit 8caf104

Please sign in to comment.