Google-docs – How to track viewership in Google Docs

google docs

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.

Best Answer

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.

References

Extend Google Docs, Sheets, and Forms with Apps Script