Add Dimension Filters to Google Analyics Node

This commit is contained in:
Jan Oberhauser
2021-06-25 15:51:02 +02:00
parent 6c7e1ec3c9
commit 876cf7323d
3 changed files with 95 additions and 0 deletions

View File

@@ -183,6 +183,85 @@ export const reportFields = [
},
],
},
{
displayName: 'Dimension Filters',
name: 'dimensionFiltersUi',
type: 'fixedCollection',
default: {},
typeOptions: {
multipleValues: true,
},
placeholder: 'Add Dimension Filter',
description: 'Dimension Filters in the request',
options: [
{
displayName: 'Filters',
name: 'filterValues',
values: [
{
displayName: 'Dimension Name',
name: 'dimensionName',
type: 'options',
typeOptions: {
loadOptionsMethod: 'getDimensions',
},
default: '',
description: 'Name of the dimension to filter by.',
},
// https://developers.google.com/analytics/devguides/reporting/core/v4/rest/v4/reports/batchGet#Operator
{
displayName: 'Operator',
name: 'operator',
type: 'options',
default: 'EXACT',
description: 'Operator to use in combination with value.',
options: [
{
name: 'Begins With',
value: 'BEGINS_WITH',
},
{
name: 'Ends With',
value: 'ENDS_WITH',
},
{
name: 'Exact',
value: 'EXACT',
},
{
name: 'Greater Than (number)',
value: 'NUMERIC_GREATER_THAN',
},
{
name: 'Partial',
value: 'PARTIAL',
},
{
name: 'Regular Expression',
value: 'REGEXP',
},
{
name: 'Equal (number)',
value: 'NUMERIC_EQUAL',
},
{
name: 'Less Than (number)',
value: 'NUMERIC_LESS_THAN',
},
],
},
{
displayName: 'Value',
name: 'expressions',
type: 'string',
default: '',
placeholder: 'ga:newUsers',
description: `String or <a href="https://support.google.com/analytics/answer/1034324?hl=en" target="_blank">regular expression</a> to match against.`,
},
],
},
],
},
{
displayName: 'Hide Totals',
name: 'hideTotals',