Skip to content

Commit

Permalink
fix: removed duplicate registration events (#1333)
Browse files Browse the repository at this point in the history
  • Loading branch information
awais-ansari authored Oct 18, 2024
1 parent 9239df3 commit f086a16
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/register/RegistrationPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ import {
ELEMENT_NAME, ELEMENT_TEXT, ELEMENT_TYPES, PAGE_TYPES,
} from '../cohesion/constants';
import { setCohesionEventStates } from '../cohesion/data/actions';
import trackCohesionEvent from '../cohesion/trackers';
import { getThirdPartyAuthContext as getRegistrationDataFromBackend } from '../common-components/data/actions';
import EnterpriseSSO from '../common-components/EnterpriseSSO';
import ThirdPartyAuth from '../common-components/ThirdPartyAuth';
Expand Down Expand Up @@ -94,7 +93,6 @@ const RegistrationPage = (props) => {
const providers = useSelector(state => state.commonComponents.thirdPartyAuthContext.providers);
const secondaryProviders = useSelector(state => state.commonComponents.thirdPartyAuthContext.secondaryProviders);
const pipelineUserDetails = useSelector(state => state.commonComponents.thirdPartyAuthContext.pipelineUserDetails);
const cohesionEventData = useSelector(state => state.cohesion.eventData);

const backendValidations = useSelector(getBackendValidations);
const queryParams = useMemo(() => getAllPossibleQueryParams(), []);
Expand Down Expand Up @@ -191,9 +189,6 @@ const RegistrationPage = (props) => {
// This event is used by GTM
trackRegistrationSuccess();

// This event is used by cohestion upon successful registration
trackCohesionEvent(cohesionEventData);

// This is used by the "User Retention Rate Event" on GTM
setCookie(getConfig().USER_RETENTION_COOKIE_NAME, true);

Expand All @@ -202,7 +197,7 @@ const RegistrationPage = (props) => {
// Remove this cookie that was set to capture marketingEmailsOptIn for the onboarding component
removeCookie('ssoPipelineRedirectionDone');
}
}, [registrationResult, cohesionEventData]);
}, [registrationResult]);

const handleOnChange = (event) => {
const { name } = event.target;
Expand Down

0 comments on commit f086a16

Please sign in to comment.