Expand my Community achievements bar.

Join us January 15th for an AMA with Champion Achaia Walton, who will be talking about her article on Event-Based Reporting and Measuring Content Groups!
SOLVED

Google Translation on my website

Avatar

Level 1

Am I able to track on my website how many times out of session total a user clicked on the google translate option? if so, how?

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

If you're referring to the Google Translate widget, then I don't think it provides a callback function to indicate that it has finished translating your web page. The next best thing could be to detect changes in the widget's dropdown selection, and assume that the user has translated the page if the selected item is not the same as what it was before.

Note: Google does not support the Translate widget any more. https://support.google.com/translate/thread/4007370?hl=en

View solution in original post

2 Replies

Avatar

Correct answer by
Community Advisor

If you're referring to the Google Translate widget, then I don't think it provides a callback function to indicate that it has finished translating your web page. The next best thing could be to detect changes in the widget's dropdown selection, and assume that the user has translated the page if the selected item is not the same as what it was before.

Note: Google does not support the Translate widget any more. https://support.google.com/translate/thread/4007370?hl=en

Avatar

Level 6

You're going to have to head to Stack Overflow for this. You're going to have to sift through everything that happens in the console when an auto-translator is used, and this is going to vary between browsers. I recommend https://stackoverflow.com/questions/62998768/detecting-auto-translation-event-in-microsoft-edge as a jumping off point.