Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Analytics 4 / Custom dimension with multiple values per event

Im trying to extend Google Analytics 4 reports with data from the contact form submission.

Im sending event with a custom data through dataLayer to Google Tag Manager. Then GTM sends this to Google Analytics 4.

window.dataLayer.push({
 event: 'formSubmission',
 formData: {
  lead_name: 'Lorem',
  lead_email: '[email protected]',
  lead_areas: ['web app design', 'mobile development']
 }
});

I've correctly registered all custom dimensions and my data proceed correctly.

However, when im trying to create the report using lead_areas, Im facing a trouble that my areas listed as a string with comma-separated values instead of single values. enter image description here

I don't have much experience in GA4. Please help me understand,

How can I send multiple values for one custom dimension in the scope of single event?

Thanks!

like image 248
Pavlo Zhuravlov Avatar asked Oct 24 '25 05:10

Pavlo Zhuravlov


1 Answers

There are two type of custom parameters: text or number. So you can't send an array as value of a parameter but you can send different parameters like lead_area1, lead_area2, etc...

like image 182
Michele Pisani Avatar answered Oct 27 '25 02:10

Michele Pisani



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!