One Easy Hack To Capture Google Translate Usage Data In Google Analytics

How to track google translate with google analytics

One of the great features of Google Translate is the Website Translator plugin.

It’s quick to configure, easy to install, and gives your site visitors the ability to instantly view your website in 100 (or more) languages. The added bonus is that it’s FREE!

The Website Translator, uses Google Analytics Events to track the translation tool usage.

When someone uses the tool to select a language or is sent to a page with the necessary special parameters, it captures:
EVENT CATEGORY: Google Website Translator,
EVENT ACTION: Translate
, and
EVENT LABEL: Abbreviated Language.

This data can then be found in the standard Behaviour > Events reports.

If you are using Google Analytics ga.js on your website and you have added your Tracking ID to the translator tool during it’s configuration setup, once the Translator Tool code is installed on website, your work is done, enjoy the new data!

If you are using the current Universal analytics.js (which should be most of us by now), then there is a little more work to do.

As at Jan 2016, the translation tool’s event tracking code has not been updated to work with the Universal analytics.js event tracking syntax.

Setting Up Google Website Translate Tracking With Universal Analytics

I’ve seen some articles about getting this to work, that require downloading the translate tool’s javascript and hacking it all to pieces to incorporate the Universal analytics.js event tracking and then hosting the translate code yourself … and … and … and … the list goes on.

Here is a quick, easy, hack to get your Google Analytics reports rocking with translation language data again.

  1. Install the Universal analytics.js tracking code snippet for your web property as required.
  2. Then, if your site is http, place the following in your site pages before the closing </head> tag

    <script src=”http://www.google-analytics.com/ga.js”></script>

    If your site is https, use the following code instead
    <script src=”https://ssl.google-analytics.com/ga.js”></script>

    This adds the ga.js script to your website. The full ga.js tracking code snippet isn’t required as we are not using Analytics ga.js to do anything except fire the events that are sent by the translation tool.

  3. You’ll then be able to see the translate tool event data in your reports again –
    Event report language label

Google Translate Event Label Country Abbreviations

Afrikaansaf

Albaniansq

Amharicam

Arabicar

Armenianhy

Azerbaijaniaz

Basqueeu

Belarusianbe

Bengalibn

Bosnianbs

Bulgarianbg

Catalanca

Cebuanoceb

Chichewany

Chinese simplifiedzh-CN

Chinese traditionalzh-TW

Corsicanco

Croatianhr

Czechcs

Danishda

Dutchnl

Esperantoeo

Estonianet

Filipinotl

Finnishfi

Frenchfr

Frisianfy

Galiciangl

Georgianka

Germande

Greekel

Gujaratigu

Haitian Creoleht

Hausaha

Hawaiianhaw

Hebrewiw

Hindihi

Hmonghmn

Hungarianhu

Icelandicis

Igboig

Indonesianid

Irishga

Italianit

Japaneseja

Javanesejw

Kannadakn

Kazakhkk

Khmerkm

Koreanko

Kurdish (Kurmanji)ku

Kyrgyzky

Laolo

Latinla

Latvianlv

Lithuanianlt

Luxembourgishlb

Macedonianmk

Malagasymg

Malayms

Malayalamml

Maltesemt

Maorimi

Marathimr

Mongolianmn

Myanmar (Burmese)my

Nepaline

Norwegianno

Pashtops

Persianfa

Polishpl

Portuguesept

Punjabipa

Romanianro

Russianru

Scots Gaelicgd

Samoansm

Serbiansr

Sesothost

Shonasn

Sindhisd

Sinhalasi

Slovaksk

Sloveniansl

Somaliso

Spanishes

Sundanesesu

Swahilisw

Swedishsv

Tajiktg

Tamilta

Telugute

Thaith

Turkishtr

Ukrainianuk

Urduur

Uzbekuz

Vietnamesevi

Welshcy

Xhosaxh

Yiddishyi

Yorubayo

Zuluzu

Configuring and installing Google Website Translator

  1. To get started, go to Google Website Translator.
  2. On the next page, click the Add to your website now button

    Add google translator to your website now

  3. You will then have access to the Website Info settings. These are pretty straight forward. Once you have completed the necessary details such as website url and the default language of your site, click the Next button to access the Plugin Settings page.

    Website info settings

  4. On the Plugin Settings page, under the Advanced options, be sure to tick the box for Track translation traffic using Google Analytics and enter your Tracking Id.

    Website Translator plugin settings

  5. Follow the rest of the Tool’s instructions for getting and installing the code on your site.