This commit is contained in:
砂糖
2026-01-24 16:54:44 +08:00
commit 70f337bb92
186 changed files with 23792 additions and 0 deletions

15
gtag.js Normal file
View File

@@ -0,0 +1,15 @@
export const GA_TRACKING_ID = process.env.NEXT_PUBLIC_GOOGLE_ID || null;
export const pageview = (url) => {
window.gtag("config", GA_TRACKING_ID, {
page_path: url,
});
};
export const event = ({ action, category, label, value }) => {
window.gtag("event", action, {
event_category: category,
event_label: label,
value: value,
});
};