I am having trouble getting the filter to work. I want to be able to get all the visits to this page. I was wondering not only how to get the filter to work, but also the start date. I would like to see how to make it page specific as well as not limited by the date. Thanks!
function Update() {
try {
var api = Analytics.Data.Ga.get(
"ga:162531584", // Table id (format ga:xxxxxx).
"forever?", // Start-date (format yyyy-MM-dd).
"yesterday", // End-date (format yyyy-MM-dd).
'ga:pageviews', // Comma seperated list of metrics.
'filters=ga:pagePath==/downloads/IAU.php;'
);
var sheet = SpreadsheetApp.getActiveSheet();
sheet.getRange(1, 1).setValue(api.rows[0][0]);
} catch(error) {
Browser.msgBox("Failed To Get Statistics!\r\n" + error);
}
}