Skip to content

Commit

Permalink
Merge pull request #139 from Rushikesh-Sonawane99/release-1.0.0
Browse files Browse the repository at this point in the history
Issue #PS-1636 chore: Added GA event for event creation tracking
  • Loading branch information
itsvick authored Aug 13, 2024
2 parents e1b88f6 + f89ef9d commit 8f83bcd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/AddFacilitator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ const AddFacilitatorModal: React.FC<AddFacilitatorModalprops> = ({
'success'
);
ReactGA.event('facilitator-created-successfully', {
user_name: username,
userName: username,
});

const isQueue = false;
Expand Down
7 changes: 7 additions & 0 deletions src/components/PlannedSession.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ import {
import SessionMode from './SessionMode';
import { showToastMessage } from './Toastify';
import WeekDays from './WeekDays';
import ReactGA from 'react-ga4';

type mode = (typeof sessionMode)[keyof typeof sessionMode];
type type = (typeof sessionType)[keyof typeof sessionType];
Expand Down Expand Up @@ -627,6 +628,9 @@ const PlannedSession: React.FC<PlannedModalProps> = ({
t('COMMON.SESSION_SCHEDULED_SUCCESSFULLY'),
'sucess'
);
ReactGA.event('event-created-successfully', {
creatorId: userId,
});
if (onCloseModal) {
onCloseModal();
}
Expand All @@ -641,6 +645,9 @@ const PlannedSession: React.FC<PlannedModalProps> = ({
);
} catch (error) {
console.error('Error scheduling new event:', error);
ReactGA.event('event-creation-fail', {
error: error,
});
}
};

Expand Down

0 comments on commit 8f83bcd

Please sign in to comment.