mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
Update useGoogleAnalytics.js
This commit is contained in:
@@ -12,9 +12,14 @@ const useGoogleAnalytics = () => {
|
|||||||
window.gtag('config', GA_MEASUREMENT_ID, {
|
window.gtag('config', GA_MEASUREMENT_ID, {
|
||||||
'page_path': fullPath,
|
'page_path': fullPath,
|
||||||
});
|
});
|
||||||
window.gtag('event', 'page_view', {'page_path': fullPath});
|
window.gtag('event', 'page_view', {
|
||||||
|
'page_path': fullPath,
|
||||||
|
'page_location': window.location.href
|
||||||
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
}, [location]);
|
}, [location]);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export default useGoogleAnalytics;
|
export default useGoogleAnalytics;pat
|
||||||
|
|||||||
Reference in New Issue
Block a user