Open aroncal opened 8 months ago
What page is this happening on https://ga-dev-tools.google/ga4/query-explorer/ And same thing goes with the node package @google-analytics/data version 4.3.0
Describe the bug With the GA4 API in node, I'm trying to get the the "lead_id" custom parameter's value for each lead submitted with gtag. I get the string "Array" for the value of the even't custom parameter, instead of the value, like this:
{ "dimensionHeaders": [ { "name": "customEvent:lead_id" }, { "name": "sessionDefaultChannelGroup" }, { "name": "landingPage" }, { "name": "city" }, { "name": "country" } ], "metricHeaders": [], "rows": [ { "dimensionValues": [ { "value": "Array", "oneValue": "value" }, { "value": "Organic Search", "oneValue": "value" }, { "value": "/", "oneValue": "value" }, { "value": "Istanbul", "oneValue": "value" }, { "value": "Türkiye", "oneValue": "value" } ], "metricValues": [] }, ]
To Reproduce In GA4 i have defined a custom dimension, with "scope=Event" and "event parameter=lead_id":
With gtag (GA4) I send a "generate_lead" event with a custom parameter, like this (GA debugger output):
Processing GTAG command: ["event", "generate_lead", {currency: "EUR", value: 1, lead_id: "8209"}]
I check with the GA debugger that the event is correctly sent:
Then, with the node package or the query explorer, I make the following request:
let requestBody = { property: `properties/${process.env.PROPERTY_ID}`, dateRanges: [{startDate: '2daysAgo', endDate: '2daysAgo'}], dimensionFilter: { andGroup: { expressions: [ { filter: { fieldName: "hostName", stringFilter: { value: hostName } } }, { filter: { fieldName: "eventName", stringFilter: { value: "generate_lead" }, } } ] } }, dimensions: [ {name: "customEvent:lead_id"}, {name: "sessionDefaultChannelGroup"}, {name: "landingPage"}, {name: "city"}, {name: "country"}, ] };
Expected behavior I expect to get the lead's id (8209 in the example), like this:
{ "dimensionHeaders": [ { "name": "customEvent:lead_id" }, { "name": "sessionDefaultChannelGroup" }, { "name": "landingPage" }, { "name": "city" }, { "name": "country" } ], "metricHeaders": [], "rows": [ { "dimensionValues": [ { "value": "8209", "oneValue": "value" }, { "value": "Organic Search", "oneValue": "value" }, { "value": "/", "oneValue": "value" }, { "value": "Istanbul", "oneValue": "value" }, { "value": "Türkiye", "oneValue": "value" } ], "metricValues": [] }, ]
What page is this happening on https://ga-dev-tools.google/ga4/query-explorer/ And same thing goes with the node package @google-analytics/data version 4.3.0
Describe the bug With the GA4 API in node, I'm trying to get the the "lead_id" custom parameter's value for each lead submitted with gtag. I get the string "Array" for the value of the even't custom parameter, instead of the value, like this:
To Reproduce In GA4 i have defined a custom dimension, with "scope=Event" and "event parameter=lead_id":
With gtag (GA4) I send a "generate_lead" event with a custom parameter, like this (GA debugger output):
I check with the GA debugger that the event is correctly sent:![image](https://github.com/googleanalytics/ga-dev-tools/assets/1116347/0e2c3283-f9bc-4564-ab86-47e642fb01fc)
Then, with the node package or the query explorer, I make the following request:
Expected behavior I expect to get the lead's id (8209 in the example), like this: