googleworkspace / apps-script-samples

Apps Script samples for Google Workspace products.
https://developers.google.com/apps-script
Apache License 2.0
4.5k stars 1.83k forks source link

Analytics Data Service #349

Open alexxiroma opened 2 years ago

alexxiroma commented 2 years ago

how can i add new dimension or new metric, help me please

const metric = AnalyticsData.newMetric();
metric.name = 'activeUsers';

const dimension = AnalyticsData.newDimension();
dimension.name = ('platform');
ikuleshov commented 2 years ago

Hello,

Please check out the following example script.

t3hyx commented 1 year ago

Hello @ikuleshov

The script example from google you shared does not explain how to add multiple metrics/dimensions. Obviously the OP known about this example script otherwise he wouldn't be able to talk about the AnalyticsData. method...