Skip to content

Commit

Permalink
adding custom plugin - experiment
Browse files Browse the repository at this point in the history
  • Loading branch information
ami-aman committed Nov 14, 2023
1 parent 8e8cd07 commit c4d8648
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/CustomerioTracking.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { CustomerIOInAppMessaging } from './CustomerIOInAppMessaging';
import { CustomerIOPushMessaging } from './CustomerIOPushMessaging';
import type { PushPermissionStatus, PushPermissionOptions } from './types';
import { createClient } from '@segment/analytics-react-native';
import { CustomerioDestination } from '../../../analytics-react-native/packages/core/src/plugins/CustomerioDestination';

var pjson = require('customerio-reactnative/package.json');

Expand Down Expand Up @@ -77,6 +78,11 @@ class CustomerIO {
cdnProxy: "https://cdp.customer.io/v1/projects",
trackAppLifecycleEvents: true
});

// Add CustomerioDestination plugin
const customerioPlugin = new CustomerioDestination();
segmentClient.add({plugin: customerioPlugin});

segmentClient.identify("[email protected]", {"firstName": "cdp tester on react native"});
segmentClient.track('Awesome event');
// CustomerioReactnative.initialize(env, config, packageConfig);
Expand Down

0 comments on commit c4d8648

Please sign in to comment.