@maxzima/wa-communicator 1.0.17 → 1.0.19
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/engine/AccountTracker/Enums/AccountTrackerEnum.d.ts +3 -0
- package/dist/engine/AccountTracker/Public/AccountTracker.js +5 -4
- package/dist/engine/AccountTracker/Types/TAccountTracker.d.ts +0 -1
- package/package.json +1 -1
- package/src/engine/AccountTracker/Enums/AccountTrackerEnum.ts +4 -0
- package/src/engine/AccountTracker/Public/AccountTracker.ts +5 -4
- package/src/engine/AccountTracker/Types/TAccountTracker.ts +0 -1
- package/test/testunits/accountTracker/events.ts +4 -2
- package/test/testunits/accountTracker/general.ts +0 -1
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
export class AccountTracker {
|
|
2
2
|
constructor(props) {
|
|
3
|
-
this.sendGtmEvent = (event) => {
|
|
4
|
-
if (typeof this.props.gtmDataLayer === 'undefined'
|
|
3
|
+
this.sendGtmEvent = (event, contact) => {
|
|
4
|
+
if (typeof this.props.gtmDataLayer === 'undefined') {
|
|
5
5
|
return;
|
|
6
6
|
}
|
|
7
7
|
this.props.gtmDataLayer.push({
|
|
8
8
|
event,
|
|
9
|
+
contact,
|
|
9
10
|
origin: this.props.origin || null,
|
|
10
11
|
});
|
|
11
12
|
};
|
|
@@ -20,11 +21,11 @@ export class AccountTracker {
|
|
|
20
21
|
this.props = props;
|
|
21
22
|
}
|
|
22
23
|
sendPhoneVerifyEvent() {
|
|
23
|
-
this.sendGtmEvent("phone");
|
|
24
|
+
this.sendGtmEvent("verify_contact", "phone");
|
|
24
25
|
this.sendLinkedInEvent(8612332);
|
|
25
26
|
}
|
|
26
27
|
sendEmailVerifyEvent() {
|
|
27
|
-
this.sendGtmEvent("email");
|
|
28
|
+
this.sendGtmEvent("verify_contact", "email");
|
|
28
29
|
this.sendLinkedInEvent(8612340);
|
|
29
30
|
}
|
|
30
31
|
sendRegistrationSuccessEvent() {
|
package/package.json
CHANGED
|
@@ -6,12 +6,12 @@ export class AccountTracker {
|
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
public sendPhoneVerifyEvent () {
|
|
9
|
-
this.sendGtmEvent(GTMEventEnum.PHONE);
|
|
9
|
+
this.sendGtmEvent(GTMEventEnum.VERIFY_CONTACT, GTMEventContactEnum.PHONE);
|
|
10
10
|
this.sendLinkedInEvent(LintrkEventIdEnum.PHONE);
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
public sendEmailVerifyEvent () {
|
|
14
|
-
this.sendGtmEvent(GTMEventEnum.EMAIL);
|
|
14
|
+
this.sendGtmEvent(GTMEventEnum.VERIFY_CONTACT, GTMEventContactEnum.EMAIL);
|
|
15
15
|
this.sendLinkedInEvent(LintrkEventIdEnum.EMAIL);
|
|
16
16
|
}
|
|
17
17
|
|
|
@@ -19,13 +19,14 @@ export class AccountTracker {
|
|
|
19
19
|
this.sendLinkedInEvent(LintrkEventIdEnum.REGISTRATION);
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
private sendGtmEvent = (event: GTMEventEnum) => {
|
|
23
|
-
if (typeof this.props.gtmDataLayer === 'undefined'
|
|
22
|
+
private sendGtmEvent = (event: GTMEventEnum, contact: GTMEventContactEnum) => {
|
|
23
|
+
if (typeof this.props.gtmDataLayer === 'undefined') {
|
|
24
24
|
return;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
this.props.gtmDataLayer.push({
|
|
28
28
|
event,
|
|
29
|
+
contact,
|
|
29
30
|
origin: this.props.origin || null,
|
|
30
31
|
});
|
|
31
32
|
};
|
|
@@ -2,7 +2,8 @@ import {accountTrackerInitPropsNormal} from "./general";
|
|
|
2
2
|
|
|
3
3
|
const phoneVerifyEvents = {
|
|
4
4
|
gtm: {
|
|
5
|
-
event: '
|
|
5
|
+
event: 'verify_contact',
|
|
6
|
+
contact: 'phone',
|
|
6
7
|
origin: accountTrackerInitPropsNormal.origin,
|
|
7
8
|
},
|
|
8
9
|
linkedIn: {
|
|
@@ -15,7 +16,8 @@ const phoneVerifyEvents = {
|
|
|
15
16
|
|
|
16
17
|
const emailVerifyEvents = {
|
|
17
18
|
gtm: {
|
|
18
|
-
event: '
|
|
19
|
+
event: 'verify_contact',
|
|
20
|
+
contact: 'email',
|
|
19
21
|
origin: accountTrackerInitPropsNormal.origin,
|
|
20
22
|
},
|
|
21
23
|
linkedIn: {
|