/** * Google Analytics Node - Version 1 * Discriminator: resource=report, operation=get */ interface Credentials { googleAnalyticsOAuth2: CredentialReference; } /** Return the analytics data */ export type GoogleAnalyticsV1ReportGetParams = { resource: 'report'; operation: 'get'; /** * The View ID of Google Analytics. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>. */ viewId?: string | Expression; /** * Whether to return all results or only up to a given limit * @default false */ returnAll?: boolean | Expression; /** * Max number of results to return * @displayOptions.show { returnAll: [false] } * @default 1000 */ limit?: number | Expression; /** * Whether to return a simplified version of the response instead of the raw data * @default true */ simple?: boolean | Expression; /** * Additional Fields * @default {} */ additionalFields?: { /** Date ranges in the request * @default {} */ dateRangesUi?: { /** Date Range */ dateRanges?: { /** Start Date */ startDate?: string | Expression; /** End Date */ endDate?: string | Expression; }; }; /** Dimensions are attributes of your data. For example, the dimension ga:city indicates the city, for example, "Paris" or "New York", from which a session originates. * @default {} */ dimensionUi?: { /** Dimension */ dimensionValues?: Array<{ /** Name of the dimension to fetch, for example ga:browser. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>. */ name?: string | Expression; }>; }; /** Dimension Filters in the request * @default {} */ dimensionFiltersUi?: { /** Filters */ filterValues?: Array<{ /** Name of the dimension to filter by. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>. */ dimensionName?: string | Expression; /** Operator to use in combination with value * @default EXACT */ operator?: 'BEGINS_WITH' | 'ENDS_WITH' | 'NUMERIC_EQUAL' | 'EXACT' | 'NUMERIC_GREATER_THAN' | 'NUMERIC_LESS_THAN' | 'PARTIAL' | 'REGEXP' | Expression; /** String or <a href="https://support.google.com/analytics/answer/1034324?hl=en">regular expression</a> to match against */ expressions?: string | Expression | PlaceholderValue; }>; }; /** Whether to hide the total of all metrics for all the matching rows, for every date range * @default false */ hideTotals?: boolean | Expression; /** Whether to hide the minimum and maximum across all matching rows * @default false */ hideValueRanges?: boolean | Expression; /** Whether the response exclude rows if all the retrieved metrics are equal to zero * @default false */ includeEmptyRows?: boolean | Expression; /** Metrics in the request * @default {} */ metricsUi?: { /** Metric */ metricValues?: Array<{ /** An alias for the metric expression is an alternate name for the expression. The alias can be used for filtering and sorting. */ alias?: string | Expression | PlaceholderValue; /** <p>A metric expression in the request. An expression is constructed from one or more metrics and numbers.</p><p>Accepted operators include: Plus (+), Minus (-), Negation (Unary -), Divided by (/), Multiplied by (*), Parenthesis, Positive cardinal numbers (0-9), can include decimals and is limited to 1024 characters.</p><p>Example ga:totalRefunds/ga:users, in most cases the metric expression is just a single metric name like ga:users.</p><p>Adding mixed MetricType (E.g., CURRENCY + PERCENTAGE) metrics will result in unexpected results.</p>. * @default ga:newUsers */ expression?: string | Expression | PlaceholderValue; /** Specifies how the metric expression should be formatted * @default INTEGER */ formattingType?: 'CURRENCY' | 'FLOAT' | 'INTEGER' | 'PERCENT' | 'TIME' | Expression; }>; }; /** Whether to enable resource based quotas * @default false */ useResourceQuotas?: boolean | Expression; }; }; export type GoogleAnalyticsV1ReportGetNode = { type: 'n8n-nodes-base.googleAnalytics'; version: 1; credentials?: Credentials; config: NodeConfig; };