One of our clients recently had a requirement to audit every document click made by a user on their site. Unfortunately, Office365 does not audit clicks, only deletes and updates so we were on our own.
Steps to implement
Add the code below to a file such as TrackClicks.js
Add the <script src=”Scripts/TrackClicks.js” type=”…”> to the master page
Publish the master page and test.
After the first click a list will be created called “Clicks”. Modify this list to have draft item security enabled
var listName = ‘Clicks’;
var storageSiteAPI = ‘https://expertassist.com/sites/_api/web’; // No trailing slash
Ulysses Ludwig is a SharePoint architect with over 16 years in the IT and computer industry. Ulysses' primary focus is SharePoint but he dabbles in the latest web technologies and likes to develop software in his spare time.