Skip to content

Commit

Permalink
feat: update segment
Browse files Browse the repository at this point in the history
  • Loading branch information
scopsy committed Apr 15, 2024
1 parent b3cd9a6 commit f210f0c
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,20 @@ export class SubscriberJobBound {

await this.validateSubscriberIdProperty(subscriber);

/**
* Due to Mixpanel HotSharding, we don't want to pass userId for production volume
*/
const segmentUserId = ['test-workflow', 'digest-playground'].includes(
command.payload.__source
)
? userId
: '';

this.analyticsService.mixpanelTrack(
'Notification event trigger - [Triggers]',
'',
segmentUserId,
{
name: template.name,
type: template?.type || 'REGULAR',
transactionId: command.transactionId,
_template: template._id,
Expand Down

0 comments on commit f210f0c

Please sign in to comment.