Estoy creando un pequeño cli de Node JS y estoy usando los informes de Google Analytics, tengo un montón de eventos configurados, mi categoría se llama "Fudge: Core", pero cuando intento usar los filters no obtengo ningún dato. de vuelta en rows , pero eliminando los filtros por completo, veo los datos.
¿Qué me estoy perdiendo?
#!/usr/bin/env node require('dotenv').config(); const fs = require('fs'); const path = require('path'); const dotenv = require('dotenv'); const env = dotenv.parse(fs.readFileSync(path.resolve(__dirname + '/../', `.env`))); const Table = require('cli-table3'); const colors = require('colors'); const { google } = require('googleapis'); const dayjs = require('dayjs'); const startDate = dayjs().format('YYYY-MM-DD') const endDate = dayjs().format('YYYY-MM-DD') // Google scopes and credentials const scopes = 'https://www.googleapis.com/auth/analytics.readonly' const credentials = JSON.parse(env.GOOGLE_APPLICATION_CREDENTIALS) // Google jwt const jwt = new google.auth.JWT(credentials.client_email, null, credentials.private_key, scopes) // Analytics view const view_id = '257544393' async function getData() { const response = await jwt.authorize() const result = await google.analytics('v3').data.ga.get({ 'auth': jwt, 'ids': 'ga:' + view_id, 'start-date': '2022-01-01', 'end-date': endDate, 'metrics': 'ga:uniqueEvents', 'filters': 'ga:eventCategory=="Fudge: Core"', // <-- something wrong here? 'dimensions': 'ga:eventCategory,ga:eventAction,ga:eventLabel' }) console.dir(result.data.rows) } getData()