-
Notifications
You must be signed in to change notification settings - Fork 17
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: Google Analytics & feedback component #120
Conversation
}; | ||
|
||
export default function Feedback({ resource }) { | ||
const [reaction, setReaction] = useState(null); |
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.
do we care about any type of persistence for this (local storage or beyond?)? probably not, but just adding an note.
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 callout - I went with the easiest route, but that does allow users to full-refresh and vote again. didn't think it was worth the effort for now, but we can keep an eye on stats and add it later if needed.
FWIW I noticed that other docs sites (reactnative.dev, docs.expo.dev) do the same thing.
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.
impressive work
This PR is a modification of #2, but using Google Analytics instead of HappyReact
Reasons:
And the events show up in Google Analytics, which we can report on or send notifications in response to:
![image](https://private-user-images.githubusercontent.com/5148640/298634318-b2f27ab4-d5bf-47f1-b7fd-f653e6c609a1.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkyNDg1MzMsIm5iZiI6MTczOTI0ODIzMywicGF0aCI6Ii81MTQ4NjQwLzI5ODYzNDMxOC1iMmYyN2FiNC1kNWJmLTQ3ZjEtYjdmZC1mNjUzZTZjNjA5YTEucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxMSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTFUMDQzMDMzWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9NjRhOThmNTU0MDBkYjg1ZDkxNDdkY2Y1YjcyM2E1M2ViYzdjZDgxYzhkYmM2ODcyYWI2YmE0ZDcyNWM0YWQ4ZCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.1wCDX2rcxSwUxSRi17jGRVrBQ9NfxjWJFLfEe_b-ztk)