Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@clix-so/react-native-sdk",
"version": "1.4.0",
"version": "1.4.1",
"description": "Clix - Mobile push for builders",
"main": "./lib/module/index.js",
"types": "./lib/typescript/src/index.d.ts",
Expand Down
4 changes: 3 additions & 1 deletion src/services/EventAPIService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,16 @@ export class EventAPIService {
properties: Record<string, any>,
messageId?: string,
userJourneyId?: string,
userJourneyNodeId?: string
userJourneyNodeId?: string,
sourceType?: string
): Promise<void> {
try {
ClixLogger.debug(`Tracking event: ${name} for device: ${deviceId}`);

const eventRequestBody = {
device_id: deviceId,
name: name,
...(sourceType && { source_type: sourceType }),
event_property: {
custom_properties: properties,
...(messageId && { message_id: messageId }),
Expand Down
6 changes: 4 additions & 2 deletions src/services/EventService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ export class EventService {
properties?: Record<string, any>,
messageId?: string,
userJourneyId?: string,
userJourneyNodeId?: string
userJourneyNodeId?: string,
sourceType?: string
): Promise<void> {
const deviceId = this.deviceService.getCurrentDeviceId();

Expand All @@ -40,7 +41,8 @@ export class EventService {
this.serializeProperties(properties),
messageId,
userJourneyId,
userJourneyNodeId
userJourneyNodeId,
sourceType
);
}
}
6 changes: 4 additions & 2 deletions src/services/NotificationService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,8 @@ export class NotificationService {
{},
payload.messageId,
payload.userJourneyId,
payload.userJourneyNodeId
payload.userJourneyNodeId,
'CLIX'
);
ClixLogger.debug(
'PUSH_NOTIFICATION_RECEIVED event tracked:',
Expand All @@ -446,7 +447,8 @@ export class NotificationService {
{},
payload.messageId,
payload.userJourneyId,
payload.userJourneyNodeId
payload.userJourneyNodeId,
'CLIX'
);
ClixLogger.debug(
'PUSH_NOTIFICATION_TAPPED event tracked:',
Expand Down
5 changes: 4 additions & 1 deletion src/services/SessionService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,10 @@ export class SessionService {
await this.eventService.trackEvent(
SessionEvent.SESSION_START,
{},
messageId
messageId,
undefined,
undefined,
'CLIX'
);
ClixLogger.debug(`${SessionEvent.SESSION_START} tracked`);
} catch (error) {
Expand Down