Skip to content
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: add event tracker #36

Merged
merged 1 commit into from
Oct 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/modules/homepage/components/BuyACoffee.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ const BuyACoffee: React.FC = () => {
<button
className="flex justify-center border border-solid w-full px-5 py-3 rounded-xl hover:border-gray-400"
onClick={handleShowQris}
data-umami-event="Click : QRIS"
>
<Image
src="/images/qris-logo.webp"
Expand All @@ -37,6 +38,7 @@ const BuyACoffee: React.FC = () => {
alt="Bank Transfer"
width={150}
height={80}
data-umami-event="Click : Bank Transfer"
/>
</Link>
{/* <PaymentMethodButton
Expand Down
1 change: 1 addition & 0 deletions src/modules/homepage/components/Contact.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ const Contact = () => {
<div
className="hover:underline text-neutral-800 text-lg md:text-lg cursor-pointer"
onClick={() => handleEmailClick("aulianza.dev@gmail.com")}
data-umami-event="Click : Email"
>
{copiedEmail ? "Copied!" : "aulianza.dev@gmail.com"}
</div>
Expand Down
8 changes: 5 additions & 3 deletions src/modules/homepage/components/LinkItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,14 @@ const LinkItem = ({
onClick,
}: LinkItemProps) => {
return (
<button
<a
onClick={() => onClick(href, target)}
className="relative inline-flex items-center justify-start py-4 pl-4 pr-14 overflow-hidden font-medium text-neutral-800 transition-all duration-150 ease-in-out rounded-lg hover:pl-12 hover:pr-6 bg-white group border shadow-sm"
className="relative inline-flex items-center justify-start py-4 pl-4 pr-14 overflow-hidden font-medium text-neutral-800 transition-all duration-150 ease-in-out rounded-lg hover:pl-12 hover:pr-6 bg-white group border shadow-sm cursor-pointer"
data-aos="fade-down"
data-aos-duration="1000"
data-aos-delay={index * 100}
data-umami-event={`Click Link : ${label}`}
href="javascript:;"
>
<span
className={clsx(
Expand Down Expand Up @@ -70,7 +72,7 @@ const LinkItem = ({
{label}
</span>
</div>
</button>
</a>
);
};

Expand Down
7 changes: 6 additions & 1 deletion src/modules/homepage/components/PaymentMethodButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,12 @@ const PaymentMethodButton: React.FC<PaymentMethodButtonProps> = ({
imageSrc,
altText,
}) => (
<Link href={href} target="_blank" className="w-full">
<Link
href={href}
target="_blank"
className="w-full"
data-umami-event={`Click : ${altText}`}
>
<button className="flex justify-center border border-solid w-full px-5 py-3 rounded-xl hover:border-gray-400">
<Image src={imageSrc} alt={altText} width={90} height={40} />
</button>
Expand Down
1 change: 1 addition & 0 deletions src/modules/homepage/components/Socials.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ const Socials = () => {
data-aos-duration="1000"
data-aos-delay={index * 100}
title={item?.title}
data-umami-event={`Click Socials: ${item?.title}`}
>
{item?.icon}
</a>
Expand Down
1 change: 1 addition & 0 deletions src/modules/payment/components/AccountCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ const AccountCard = ({
<div
className="flex items-center gap-1 cursor-pointer text-xs border py-1 px-1.5 rounded-full border-neutral-300 group-hover:border-white"
onClick={handleCopy}
data-umami-event={`Copy : Account Number ${bank}`}
>
<CopyIcon size={14} />
<span>Copy</span>
Expand Down
Loading