mirror of
https://github.com/digitalocean/nginxconfig.io
synced 2024-11-10 04:24:12 +00:00
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:
parent
d58b6e08d9
commit
7340e0df74
1 changed files with 5 additions and 0 deletions
|
@ -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,
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue