Skip to content

Commit dff7a0c

Browse files
authored
Merge pull request #1454 from ASU/UDS-1943
fix(app-rfi): ga track default disabled for pii
2 parents 0670ba3 + 9bef080 commit dff7a0c

File tree

7 files changed

+16
-7
lines changed

7 files changed

+16
-7
lines changed

packages/app-rfi/src/components/steps/questions/Country.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { gaEventPropTypes, trackGAEvent } from "../../../../../../shared";
44
import { fetchCountries } from "../../../core/utils/fetchCountries";
55
import { useRfiContext } from "../../../core/utils/rfiContext";
66
import { RfiSelect } from "../../controls";
7+
import { PII_VALUE } from "../../../core/utils/constants";
78

89
// Options
910
function getCountryOptions(resultsArrayOfObjects) {
@@ -56,7 +57,7 @@ export const Country = ({ gaData }) => {
5657
...gaData,
5758
event: "select",
5859
type: label,
59-
text: e.target.selectedOptions[0].innerText,
60+
text: PII_VALUE,
6061
})
6162
}
6263
/>

packages/app-rfi/src/components/steps/questions/EmailAddress.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import React from "react";
22

33
import { gaEventPropTypes, trackGAEvent } from "../../../../../../shared";
44
import { RfiEmailInput } from "../../controls";
5+
import { PII_VALUE } from "../../../core/utils/constants";
56

67
/**
78
* @param {{ gaData: import("../../../../../../shared/services/googleAnalytics").GAEventObject}} props
@@ -21,7 +22,7 @@ export const EmailAddress = ({ gaData }) => {
2122
trackGAEvent({
2223
...gaData,
2324
type: label,
24-
text: e.target.value,
25+
text: PII_VALUE,
2526
})
2627
}
2728
/>

packages/app-rfi/src/components/steps/questions/FirstName.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import React from "react";
22

33
import { gaEventPropTypes, trackGAEvent } from "../../../../../../shared";
44
import { RfiTextInput } from "../../controls";
5+
import { PII_VALUE } from "../../../core/utils/constants";
56

67
/**
78
* @param {{ gaData: import("../../../../../../shared/services/googleAnalytics").GAEventObject}} props
@@ -21,7 +22,7 @@ export const FirstName = ({ gaData }) => {
2122
trackGAEvent({
2223
...gaData,
2324
type: label,
24-
text: e.target.value,
25+
text: PII_VALUE,
2526
})
2627
}
2728
/>

packages/app-rfi/src/components/steps/questions/LastName.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import React from "react";
22

33
import { gaEventPropTypes, trackGAEvent } from "../../../../../../shared";
44
import { RfiTextInput } from "../../controls";
5+
import { PII_VALUE } from "../../../core/utils/constants";
56

67
/**
78
* @param {{ gaData: import("../../../../../../shared/services/googleAnalytics").GAEventObject}} props
@@ -21,7 +22,7 @@ export const LastName = ({ gaData }) => {
2122
trackGAEvent({
2223
...gaData,
2324
type: label,
24-
text: e.target.value,
25+
text: PII_VALUE,
2526
})
2627
}
2728
/>

packages/app-rfi/src/components/steps/questions/Phone.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import React from "react";
22

33
import { gaEventPropTypes, trackGAEvent } from "../../../../../../shared";
44
import { RfiPhone } from "../../controls";
5+
import { PII_VALUE } from "../../../core/utils/constants";
56

67
/**
78
* @param {{ gaData: import("../../../../../../shared/services/googleAnalytics").GAEventObject}} props
@@ -21,7 +22,7 @@ export const Phone = ({ gaData }) => {
2122
trackGAEvent({
2223
...gaData,
2324
type: label,
24-
text: e.target.value,
25+
text: PII_VALUE,
2526
})
2627
}
2728
/>

packages/app-rfi/src/components/steps/questions/ZipCode.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React, { useEffect } from "react";
22

33
import { gaEventPropTypes, trackGAEvent } from "../../../../../../shared";
4-
import { KEY } from "../../../core/utils/constants";
4+
import { KEY, PII_VALUE } from "../../../core/utils/constants";
55
import { useRfiContext } from "../../../core/utils/rfiContext";
66
import { RfiTextInput } from "../../controls";
77

@@ -42,7 +42,7 @@ export const ZipCode = ({ gaData }) => {
4242
trackGAEvent({
4343
...gaData,
4444
type: label,
45-
text: e.target.value,
45+
text: PII_VALUE,
4646
})
4747
}
4848
/>

packages/app-rfi/src/core/utils/constants.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,3 +89,7 @@ export const DATA_SOURCE = {
8989
ASU_ONLINE: "https://cms.asuonline.asu.edu/lead-submissions-v3.5/programs",
9090
COUNTRIES_STATES: "https://api.myasuplat-dpl.asu.edu/api/codeset/countries",
9191
};
92+
93+
// Personally Identifiable Information (PII)
94+
// UDS-1943 : Fields containing PII should not send the PII to data layer
95+
export const PII_VALUE = "REDACTED";

0 commit comments

Comments
 (0)