skip to content
Ben Lau statistics . machine learning . programming . optimization . research

Web Tracking

2 min read Updated:
  • Page visibility: discount the time when the page is not visible. E.g. when the user switches to another tab. MDN docs
  • Time on page: setting a timer when the page is loaded or resumed and stop it when the page is inactive. It is better than calculating the time difference between two consecutive page views because a user might leave the website after consuming the content, e.g. reading a lengthy blog. Page visibility should also be considered because a user might switch to another tab while reading the content, or the user might take a break and leave the page open.
  • Scroll depth: Create custom dimensions for scroll percentages such as 10%, 25%, 50%, and so forth. This method effectively tracks how far users scroll through our blog posts, providing insights into their interest and engagement with the entire content.

Tools

Don’t reinvent the tool.

  • Google Analytics
  • Adobe Analytics
  • Hotjar
  • matomo (open-source)

Google Analytics

Resources