add tracking

This commit is contained in:
Viktor Rådberg
2023-08-26 21:52:36 +02:00
parent 3d8d7525d0
commit 1d6847b8c4
10 changed files with 509 additions and 161 deletions

View File

@@ -5,6 +5,7 @@ import { theme } from '../../Data/theme';
import { BuyMeCoffee, KoFi } from '../../Icons/generated/Support';
import { Paragraph } from './TextComponents';
import LittleGuy from '../../Icons/generated/LittleGuy';
import { useAnalytics } from '../../Data/useAnalytics';
// import { ButtonBase } from '@mui/material';
@@ -39,13 +40,16 @@ const SupportButton = styled.button`
`;
export const SupportMe = () => {
const analytics = useAnalytics();
const [isDrawerOpen, setIsDrawerOpen] = useState(false);
const handleOpenBuyMeCoffee = () => {
analytics.trackEvent('click_bmc');
window.open('https://www.buymeacoffee.com/vikeo');
};
const handleOpenKoFi = () => {
analytics.trackEvent('click_kofi');
window.open('https://ko-fi.com/vikeo');
};