Translation Widget & Google Analytics

  • Issue description: I set up a language_change event in the console with the five event parameters. But nothing shows up in GA4. Am I missing a step? Or, could it be that it’s not working because I use Google Tag Manager scripts in my pages rather than GA4 scripts?

  • Link to the page with the widget in question: Financial Assistance : Marina Coast Water District

Hi there, @user37754 :waving_hand:

With the current setup of your website, the info about language_change events will be sent to GTM only. If you’d like to track it via GA4, it should be installed on your website as well.

Let me know if it helped or if you have any questions left :slightly_smiling_face:

Thanks!

You’re very welcome :wink:

In the meantime, we’d like to invite you to join our Birthday Contest, where you could win 6 FREE Months for your subscription.

Check the details and join in: Birthday Contest: 10 Winners, 5 Free Years with Elfsight! 🎁

Okay. I’ve set up the “language_change” tag in Google Tag Manager, and it’s showing up in GA4. However, how do I get the parameters “language_code” or “language_name” to show up?

Your " Tracking Events with Google Tag Manager - Elfsight Help Center " page says “Enter the parameter name and value exactly as defined in your widget.” The values aren’t shown. Would they be “Data Layer Variables,” and I would use, for example, "{{DLV - language_code}}"?

Yep, you can use either language_code or language_name as DLV:


Give it a try and let me know if it worked :slightly_smiling_face:

Well, that doesn’t work. When trying to “Preview” in GTM, I get:

Unknown variable “DLV - language_code” found in a tag. Edit the tag and remove the reference to the unknown variable.

Figured it out! I didn’t create the Data Layer Variable in GTM. Now, it’s working! Sorry to be such a bother!

No problem!

If anything else comes up, I’ll be happy to help