chore: GA

This commit is contained in:
liuweiqing 2024-02-11 22:19:24 +08:00
parent 68b02693b0
commit acd1541311
2 changed files with 8 additions and 2 deletions

View File

@ -1,4 +1,5 @@
import React from "react";
import { sendGAEvent } from "@next/third-parties/google";
// BuyVipButton 组件
function BuyVipButton() {
@ -6,7 +7,12 @@ function BuyVipButton() {
const targetUrl = "https://store.paperai.life/checkout";
return (
<a href={targetUrl} target="_blank" className="no-underline">
<button className="bg-gold text-white font-semibold text-lg py-2 px-4 rounded cursor-pointer border-none shadow-md transition duration-300 ease-in-out transform hover:scale-110 ">
<button
className="bg-gold text-white font-semibold text-lg py-2 px-4 rounded cursor-pointer border-none shadow-md transition duration-300 ease-in-out transform hover:scale-110"
onClick={() =>
sendGAEvent({ event: "buyVipButtonClicked", value: "buy vip" })
}
>
Buy VIP TO UNLOCK Cloud Sync and Edit Mutiple Papers Simultaneously
</button>
</a>

View File

@ -51,7 +51,7 @@ const PaperManagement = () => {
//获取用户存储在云端的论文使用useCallback定义一个记忆化的函数来获取用户论文
const fetchPapers = useCallback(async () => {
const user = await getUser(supabase);
const user = await getUser();
if (user && user.id) {
// console.log("user.id", user.id);
const numbers = await getUserPaperNumbers(user.id, supabase);