Skip to content

Commit

Permalink
feat: Updated google analytics tracking by manual track and proper …
Browse files Browse the repository at this point in the history
…id (#459)
  • Loading branch information
chavda-bhavik authored Jan 12, 2024
2 parents e0f253c + 54bcfb0 commit 4534b0b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
7 changes: 5 additions & 2 deletions apps/web/design-system/button/Button.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
import { PropsWithChildren } from 'react';
import useStyles from './Button.styles';
import { Button as MantineButton, MantineSize } from '@mantine/core';

export type ButtonColors = 'blue' | 'invariant' | 'red' | 'green';
export type ButtonVariants = 'filled' | 'outline';

interface ButtonProps {
id?: string;
leftIcon?: any;
rightIcon?: any;
color?: ButtonColors;
children?: any;
size?: MantineSize;
component?: any;
type?: 'button' | 'submit' | 'reset';
Expand All @@ -22,6 +23,7 @@ interface ButtonProps {

export function Button({
children,
id,
leftIcon,
rightIcon,
href,
Expand All @@ -34,7 +36,7 @@ export function Button({
size = 'sm',
color = 'blue',
variant = 'filled',
}: ButtonProps) {
}: PropsWithChildren<ButtonProps>) {
const { classes } = useStyles({ variant, color, fullWidth });

return (
Expand All @@ -50,6 +52,7 @@ export function Button({
onClick={onClick}
loading={loading}
disabled={disabled}
id={id}
>
{children}
</MantineButton>
Expand Down
1 change: 1 addition & 0 deletions apps/web/pages/auth/signin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export default function SigninPage() {
},
});
if (query.showAddProject) {
(window as any).dataLayer?.push({ event: 'github_signup' });
push(ROUTES.SIGNIN_ONBOARDING);
} else push(ROUTES.HOME);
}
Expand Down
2 changes: 1 addition & 1 deletion apps/web/pages/auth/signup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export default function SignupPage({}) {
/>
<Input register={register('email')} size="md" placeholder="Email" required error={errors.email?.message} />
<PasswordInput register={register('password')} size="md" placeholder="Password" required />
<Button loading={isSignupLoading} fullWidth type="submit" size="md">
<Button id="signup" loading={isSignupLoading} fullWidth type="submit" size="md">
Create an account
</Button>
<Text size="md" align="center">
Expand Down

0 comments on commit 4534b0b

Please sign in to comment.