Add analytics event for langauge selection (#198)

* Add analytics event for language

* Action per language pack

* Missing underscore in action
This commit is contained in:
Matt (IPv4) Cowley 2020-12-17 15:17:40 +00:00 committed by GitHub
parent d58b6e08d9
commit 7340e0df74
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -213,6 +213,11 @@ THE SOFTWARE.
// Update the locale
this.$i18n.locale = data.computed;
// Analytics
const pack = data.computed.match(/^([a-z]+)([A-Z]*)$/).slice(1)
.map(x => x.toLowerCase()).filter(x => !!x).join('_');
analytics(`set_language_${pack}`, 'Language');
},
deep: true,
},