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: 2 additions & 0 deletions lib/src/services/event_api_service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,15 @@ class EventAPIService {
required String name,
required Map<String, dynamic> properties,
String? messageId,
String? sourceType,
}) async {
try {
ClixLogger.debug('Tracking event: $name for device: $deviceId');

final eventRequestBody = {
'device_id': deviceId,
'name': name,
if (sourceType != null) 'source_type': sourceType,
'event_property': {
'custom_properties': properties,
if (messageId != null) 'message_id': messageId,
Expand Down
2 changes: 2 additions & 0 deletions lib/src/services/event_service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ class EventService {
String name, {
Map<String, dynamic>? properties,
String? messageId,
String? sourceType,
}) async {
try {
ClixLogger.debug('Tracking event: $name');
Expand All @@ -35,6 +36,7 @@ class EventService {
deviceId: deviceId,
name: name,
properties: cleanProperties,
sourceType: sourceType,
messageId: messageId,
);

Expand Down
3 changes: 3 additions & 0 deletions lib/src/services/notification_service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -597,6 +597,7 @@ class NotificationService {

await _eventService?.trackEvent(
eventType,
sourceType: 'CLIX',
properties: properties,
messageId: messageId,
);
Expand Down Expand Up @@ -665,6 +666,7 @@ class NotificationService {

await eventService.trackEvent(
'PUSH_NOTIFICATION_RECEIVED',
sourceType: 'CLIX',
properties: properties,
messageId: messageId,
);
Expand Down Expand Up @@ -841,6 +843,7 @@ Future<void> _trackPushNotificationReceivedInBackground(

await eventService.trackEvent(
'PUSH_NOTIFICATION_RECEIVED',
sourceType: 'CLIX',
properties: properties,
messageId: messageId,
);
Expand Down
1 change: 1 addition & 0 deletions lib/src/services/session_service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ class SessionService with WidgetsBindingObserver {
try {
await _eventService.trackEvent(
SessionEvent.sessionStart.value,
sourceType: 'CLIX',
messageId: messageId,
);
ClixLogger.debug('${SessionEvent.sessionStart.value} tracked');
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: clix_flutter
description: Clix - Clix - Mobile push for builders

version: 0.0.4
version: 0.0.5
homepage: https://clix.so
repository: https://github.com/clix-so/clix-flutter-sdk

Expand Down