Unable to retrieve event parameters associated with events.
I am integrating Google Analytics into my website and trying to fetch events using the Analytics Data API. However, the parameters I sent with these events are not included in the API response.
Additionally, my events are being deleted from the Google Analytics dashboard, but they still appear in the API results.
I am doing it this way:
async function runRealtimeReport() {
const [response] = await analyticsDataClient.runRealtimeReport({
property: `properties/${propertyId}`,
dimensions: [
{ name: "eventName" },
{ name: "eventParams.video_id" }, // I also tried {name: "customEvent:video_id"}
{ name: "eventParams.duration" }, // {name: "customEvent:duration"}
],
metrics: [{ name: "eventCount" }],
});
console.log("Report result:", JSON.stringify(response, null, 2));
printRunReportResponse(response);
}
I initially did not include eventParams.video_id and duration, but after realizing that my parameters were missing from the response, I added them. I also tried registering my custom dimensions with an event scope, but they are still not working