Hi,
I was able to prepare aggregate pivot table query to fetch data using the useDataQuery() hook. but I was not able to call event analytics in the same format. can any help me on this. following are my both queries.
Aggregate analytics query:
const query= {
results: {
resource: “analytics”,
params:{ dimension:[
“ou:LEVEL-5;Nasfuph3Pqw”,
“pe:THIS_YEAR”
],
filter:“dx:h2lRF6KvfW6”,
displayProperty:“SHORTNAME”,
outputIdScheme:“NAME”
}
}
};
Event analytics:
const query={
result:{
resource:"analytics",
params:{
dimension:[
"pe:LAST_12_MONTHS",
"ou:Nasfuph3Pqw",
"jQb2gaUTsIF.TR1hHNeyROj",
],
displayProperty:"SHORTNAME",
outputType:"EVENT",
outputIdScheme:"NAME",
stage:"jQb2gaUTsIF"
}
}
};