A Custom Google Spreadsheet Function for Tracking Pageviews

GOOGLEANALYTICS is a custom Google Spreadsheet function that tracks Spreadsheet views with the help of Google Apps Script. It includes the JSDoc @customfunction tag and thus the function will autocomplete when begin typing in a spreadsheet cell.