-
Troubleshooting the issue of (other) language in Google Analytics 4 during migration from Universal Analytics
So here’s the deal: I’ve been using a couple of code snippets to set the language for visitors on my site. The first snippet does just that – sets the language. The second one does the same but also throws a “page_view” event into the mix:
gtag('set', 'language', 'client language');
gtag('event', 'page_view', { page_title: 'PAGE TITLE', page_path: 'PAGE PATH', page_location: window.location.protocol + "//" + window.location.hostname, language: 'client language', });
Everything was running smoothly until I transitioned from Universal Analytics to Google Analytics 4. Now, for some reason, Google Analytics 4 only shows “(other)” as the visitor’s language. To illustrate, here’s what it looked like before and after the switch:
[Universal Analytics screenshot](https://i.stack.imgur.com/K27aJ.png)
[Google Analytics 4 screenshot](https://i.stack.imgur.com/59AeL.png)I’ve tried using ISO 639 language codes in case the issue was due to non-standard language names but no dice. Any idea what might be causing this and how to set the language via code for Google Analytics 4? Because I’m stumped.
Log in to reply.