-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Track "Social Login" campaign #251
Conversation
ESLint Summary View Full Report
Report generated by eslint-plus-action |
Branch preview✅ Deployed to dev: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, much simpler than GTM.
src/services/analytics/trackEvent.ts
Outdated
import ReactGA from 'react-ga4' | ||
import type { UaEventOptions } from 'react-ga4/types/ga4' | ||
|
||
export const trackEvent = (eventData: UaEventOptions | string) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When can it be a string tho?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch. I've copied it over from the types definition file but we don't use it as a string ever. Removed it.
What it solves
Adds tracking to the "Social Login" campaign page according to the shared doc
How this PR fixes it
Notes
I could only test the events were being received in our analytics dashboard by modifying
useGa.ts
locally. This hook initializes ReactGA4.