If it’s just the metadata that you want, you can use activity watcher [1]. They have a browser plug-in.
It is designed for time tracking, and it only saves limited metadata. The browser plugin in particular: time of loading/switching, time spent on page, URL, title, whether the page is audible or incognito, and the tab count.