I'm trying to return all given actions for a particular event category via my Node JS application that's fetching data from the Google Reporting API V3. I'm able to fetch everything with...
app.get('/api', async (req, res) => {
const response = await jwt.authorize()
const result = await google.analytics('v3').data.ga.get({
'auth': jwt,
'ids': `ga:${viewId}`,
'start-date': '30daysAgo',
'end-date': 'today',
'dimensions': 'ga:eventCategory,ga:eventAction',
'metrics': 'ga:uniqueEvents'
})
res.send(result)
})
But as soon as I add a filter it doesn't work, no data is returned despite the 200 status code:
app.get('/api', async (req, res) => {
const response = await jwt.authorize()
const result = await google.analytics('v3').data.ga.get({
'auth': jwt,
'ids': `ga:${viewId}`,
'start-date': '30daysAgo',
'end-date': 'today',
'filters': 'ga:eventCategory==Honeycomb:%20Core',
'dimensions': 'ga:eventCategory,ga:eventAction',
'metrics': 'ga:uniqueEvents'
})
res.send(result)
})
From my understanding, spaces have to be encoded, which is what I've done, but no data is returned, am I missing something? My event category is called: Honeycomb: Core
in Google Analytics.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…