Using Google Docs, how can I track how many views my shared documents receive ?

Say, I share it with 5 collaborators, how do I know if the document has really been viewed, if so how many times ? Simply, how to do analytics on Google docs ? (not tracking edits or comments, but views)

Google had this earlier under a feature called 'Discussions' which has now been removed. There were ways of using 3rd party trackers (like statcounter.com etc.,) but I don't see a way of including scripts/html now (again this feature has changed)

I presume it could be done using some scripting feature of Google Scripts (http://scripts.google.com) & will be happy to get a solution for this simple problem.


2 Answers 2


In the New Google docs editor, the Google Analytics built-in tracking and the insertion of custom HTML code were removed but they could be extended through add-ons and Google Apps Script.

Some methods and triggers are only available in bound scripts. You could use Google Scripts, the editor to hold stand-alone scripts, to create web apps and to hold code libraries that you could call from bound scripts.


Extend Google Docs, Sheets, and Forms with Apps Script


You can see the number of people in real time who are viewing your Google Docs, simply open the doc and in the right hand corner of the screen you'll see the number of unique users who are currently viewing the document. In the screenshot below you'll see that there are three unique users viewing the document.

Screenshot of Google Docs

Unfortunately you won't know who these users are (unless they are logged into Google while viewing) nor who's viewed the document while you weren’t watching (ie the historical audit log you’re looking for).

Instead I'd consider moving your document to Google Drive and using a document tracking plugin like Orangedox | Track your Documents. This will let you track every preview of your document including each unique user who've viewed or downloaded it. Giving you the audit log history (like Google Analytics for your docs) that you're looking for.

Disclaimer: I work for Orangedox

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.