mirror of
https://github.com/hazemKrimi/personal-website.git
synced 2026-05-01 18:00:26 +00:00
Fix google analytics tracking
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
export const GOOGLE_ANALYTICS_KEY = process.env.NEXT_PUBLIC_GOOGLE_ANALYTICS_KEY;
|
||||
|
||||
// https://developers.google.com/analytics/devguides/collection/gtagjs/pages
|
||||
export const pageview = (url: any) => {
|
||||
// @ts-ignore
|
||||
window.gtag('config', GOOGLE_ANALYTICS_KEY, {
|
||||
@@ -8,7 +7,6 @@ export const pageview = (url: any) => {
|
||||
});
|
||||
};
|
||||
|
||||
// https://developers.google.com/analytics/devguides/collection/gtagjs/events
|
||||
export const event = ({ action, category, label, value }: any) => {
|
||||
// @ts-ignore
|
||||
window.gtag('event', action, {
|
||||
|
||||
Reference in New Issue
Block a user