Tracking Traffic on Google Sheets

We have a publicly accessible Google Sheets document that we would like to track the traffic on. I noticed Google Sheets does have a script editor under tools and it even has a place to insert what appears to be JavaScript. I inserted the Matomo tracking code and also added as a site to track in the admin panel, but it did not seem to track anything.

Any idea if this is even possible and if so how would it be done?


Do you see your code in the Google sheet when you access it?
If you add a breakpoint in it, is it reached?
Do you see the call to the container in the network activity?
Do you see the calls to the HTTP tracking API?
How is the DNT (Do Not Track) configured in Matomo? (note that on Firefox it seems very difficult to disable the DNT HTTP header)

There is no way to view the actual tracking code when accessing the Google Sheet as the source code on a Google Sheet is not visible, it is more of a web based application and not an actual HTML webpage.

It does not appear that it is being reached.

Not seeing any calls to the container or tracking API.

The DNT is disabled.



I’m pretty sure that the security headers of Google Sheets will disallow the Javascript to make requests to other hosts as this would be a huge privacy and security issue. (the script could e.g. just send the login-token of the user to Matomo)