Bablic provides statistics about language usage in your website, but sometimes we want to dive deeper into the analytics and integrate with our existing analytics framework.

Google Analytics JS SDK

We can add a dimension names bablic-language, which we can query on Google Analytics later on.
Your GA integration code might look like this:

ga('create', 'UA-SOME-ID', 'auto');
ga('send', 'pageview');


Edit it to create a new dimension:

ga('create', 'UA-SOME-ID', 'auto');
if(window.bablic && bablic.getLocale) {    
    ga('set', 'bablic-locale', bablic.getLocale());
}
ga('send', 'pageview');

Did this answer your question?