Custom hook for automatic analytics tracking
Handles:
Page view tracking on mount
Session duration tracking
Page visibility tracking
Cleanup on unmount
Note: Heartbeat tracking is handled by Matomo's built-in enableHeartBeatTimer
feature, which should be configured in your Matomo Tag Manager container.
Custom hook for automatic analytics tracking Handles:
Note: Heartbeat tracking is handled by Matomo's built-in enableHeartBeatTimer feature, which should be configured in your Matomo Tag Manager container.