@mparticle/web-rokt-kit 1.19.0 → 1.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Rokt-Kit.common.js +47 -1
- package/dist/Rokt-Kit.iife.js +47 -1
- package/package.json +1 -1
package/dist/Rokt-Kit.common.js
CHANGED
|
@@ -599,6 +599,49 @@ var constructor = function () {
|
|
|
599
599
|
function onUserIdentified(filteredUser) {
|
|
600
600
|
self.filters.filteredUser = filteredUser;
|
|
601
601
|
self.userAttributes = filteredUser.getAllUserAttributes();
|
|
602
|
+
_sendEventStream(_buildIdentityEvent('identify', filteredUser));
|
|
603
|
+
}
|
|
604
|
+
|
|
605
|
+
function _buildIdentityEvent(eventName, filteredUser) {
|
|
606
|
+
var mpid =
|
|
607
|
+
filteredUser.getMPID && typeof filteredUser.getMPID === 'function'
|
|
608
|
+
? filteredUser.getMPID()
|
|
609
|
+
: null;
|
|
610
|
+
var sessionId =
|
|
611
|
+
window.mParticle &&
|
|
612
|
+
window.mParticle.sessionManager &&
|
|
613
|
+
typeof window.mParticle.sessionManager.getSession === 'function'
|
|
614
|
+
? window.mParticle.sessionManager.getSession()
|
|
615
|
+
: null;
|
|
616
|
+
var userIdentities =
|
|
617
|
+
filteredUser.getUserIdentities &&
|
|
618
|
+
typeof filteredUser.getUserIdentities === 'function'
|
|
619
|
+
? filteredUser.getUserIdentities().userIdentities
|
|
620
|
+
: null;
|
|
621
|
+
|
|
622
|
+
return {
|
|
623
|
+
EventName: eventName,
|
|
624
|
+
EventDataType: 14, // MessageType.Profile
|
|
625
|
+
Timestamp: Date.now(),
|
|
626
|
+
MPID: mpid,
|
|
627
|
+
SessionId: sessionId,
|
|
628
|
+
UserIdentities: userIdentities,
|
|
629
|
+
};
|
|
630
|
+
}
|
|
631
|
+
|
|
632
|
+
function onLoginComplete(filteredUser) {
|
|
633
|
+
self.userAttributes = filteredUser.getAllUserAttributes();
|
|
634
|
+
_sendEventStream(_buildIdentityEvent('login', filteredUser));
|
|
635
|
+
}
|
|
636
|
+
|
|
637
|
+
function onLogoutComplete(filteredUser) {
|
|
638
|
+
self.userAttributes = filteredUser.getAllUserAttributes();
|
|
639
|
+
_sendEventStream(_buildIdentityEvent('logout', filteredUser));
|
|
640
|
+
}
|
|
641
|
+
|
|
642
|
+
function onModifyComplete(filteredUser) {
|
|
643
|
+
self.userAttributes = filteredUser.getAllUserAttributes();
|
|
644
|
+
_sendEventStream(_buildIdentityEvent('modify_user', filteredUser));
|
|
602
645
|
}
|
|
603
646
|
|
|
604
647
|
function setUserAttribute(key, value) {
|
|
@@ -717,6 +760,9 @@ var constructor = function () {
|
|
|
717
760
|
this.setExtensionData = setExtensionData;
|
|
718
761
|
this.setUserAttribute = setUserAttribute;
|
|
719
762
|
this.onUserIdentified = onUserIdentified;
|
|
763
|
+
this.onLoginComplete = onLoginComplete;
|
|
764
|
+
this.onLogoutComplete = onLogoutComplete;
|
|
765
|
+
this.onModifyComplete = onModifyComplete;
|
|
720
766
|
this.removeUserAttribute = removeUserAttribute;
|
|
721
767
|
|
|
722
768
|
/**
|
|
@@ -825,7 +871,7 @@ var constructor = function () {
|
|
|
825
871
|
|
|
826
872
|
function generateIntegrationName(customIntegrationName) {
|
|
827
873
|
var coreSdkVersion = window.mParticle.getVersion();
|
|
828
|
-
var kitVersion = "1.
|
|
874
|
+
var kitVersion = "1.20.0";
|
|
829
875
|
var name = 'mParticle_' + 'wsdkv_' + coreSdkVersion + '_kitv_' + kitVersion;
|
|
830
876
|
|
|
831
877
|
if (customIntegrationName) {
|
package/dist/Rokt-Kit.iife.js
CHANGED
|
@@ -598,6 +598,49 @@ var RoktKit = (function (exports) {
|
|
|
598
598
|
function onUserIdentified(filteredUser) {
|
|
599
599
|
self.filters.filteredUser = filteredUser;
|
|
600
600
|
self.userAttributes = filteredUser.getAllUserAttributes();
|
|
601
|
+
_sendEventStream(_buildIdentityEvent('identify', filteredUser));
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
function _buildIdentityEvent(eventName, filteredUser) {
|
|
605
|
+
var mpid =
|
|
606
|
+
filteredUser.getMPID && typeof filteredUser.getMPID === 'function'
|
|
607
|
+
? filteredUser.getMPID()
|
|
608
|
+
: null;
|
|
609
|
+
var sessionId =
|
|
610
|
+
window.mParticle &&
|
|
611
|
+
window.mParticle.sessionManager &&
|
|
612
|
+
typeof window.mParticle.sessionManager.getSession === 'function'
|
|
613
|
+
? window.mParticle.sessionManager.getSession()
|
|
614
|
+
: null;
|
|
615
|
+
var userIdentities =
|
|
616
|
+
filteredUser.getUserIdentities &&
|
|
617
|
+
typeof filteredUser.getUserIdentities === 'function'
|
|
618
|
+
? filteredUser.getUserIdentities().userIdentities
|
|
619
|
+
: null;
|
|
620
|
+
|
|
621
|
+
return {
|
|
622
|
+
EventName: eventName,
|
|
623
|
+
EventDataType: 14, // MessageType.Profile
|
|
624
|
+
Timestamp: Date.now(),
|
|
625
|
+
MPID: mpid,
|
|
626
|
+
SessionId: sessionId,
|
|
627
|
+
UserIdentities: userIdentities,
|
|
628
|
+
};
|
|
629
|
+
}
|
|
630
|
+
|
|
631
|
+
function onLoginComplete(filteredUser) {
|
|
632
|
+
self.userAttributes = filteredUser.getAllUserAttributes();
|
|
633
|
+
_sendEventStream(_buildIdentityEvent('login', filteredUser));
|
|
634
|
+
}
|
|
635
|
+
|
|
636
|
+
function onLogoutComplete(filteredUser) {
|
|
637
|
+
self.userAttributes = filteredUser.getAllUserAttributes();
|
|
638
|
+
_sendEventStream(_buildIdentityEvent('logout', filteredUser));
|
|
639
|
+
}
|
|
640
|
+
|
|
641
|
+
function onModifyComplete(filteredUser) {
|
|
642
|
+
self.userAttributes = filteredUser.getAllUserAttributes();
|
|
643
|
+
_sendEventStream(_buildIdentityEvent('modify_user', filteredUser));
|
|
601
644
|
}
|
|
602
645
|
|
|
603
646
|
function setUserAttribute(key, value) {
|
|
@@ -716,6 +759,9 @@ var RoktKit = (function (exports) {
|
|
|
716
759
|
this.setExtensionData = setExtensionData;
|
|
717
760
|
this.setUserAttribute = setUserAttribute;
|
|
718
761
|
this.onUserIdentified = onUserIdentified;
|
|
762
|
+
this.onLoginComplete = onLoginComplete;
|
|
763
|
+
this.onLogoutComplete = onLogoutComplete;
|
|
764
|
+
this.onModifyComplete = onModifyComplete;
|
|
719
765
|
this.removeUserAttribute = removeUserAttribute;
|
|
720
766
|
|
|
721
767
|
/**
|
|
@@ -824,7 +870,7 @@ var RoktKit = (function (exports) {
|
|
|
824
870
|
|
|
825
871
|
function generateIntegrationName(customIntegrationName) {
|
|
826
872
|
var coreSdkVersion = window.mParticle.getVersion();
|
|
827
|
-
var kitVersion = "1.
|
|
873
|
+
var kitVersion = "1.20.0";
|
|
828
874
|
var name = 'mParticle_' + 'wsdkv_' + coreSdkVersion + '_kitv_' + kitVersion;
|
|
829
875
|
|
|
830
876
|
if (customIntegrationName) {
|