We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dc6cfab commit 27472f3Copy full SHA for 27472f3
components/languages.tsx
@@ -2,6 +2,8 @@ import { Locale } from 'i18n';
2
import styled from 'styled-components';
3
import { useRouter } from 'next/dist/client/router';
4
5
+import * as gtag from 'lib/gtag';
6
+
7
const Container = styled.div`
8
top: 0;
9
right: 1rem;
@@ -29,6 +31,11 @@ export function Languages() {
29
31
const { locales, push } = useRouter();
30
32
33
const handleLocaleClick = (locale: Locale) => () => {
34
+ gtag.event({
35
+ action: 'i18n_click',
36
+ category: 'Locale',
37
+ label: locale,
38
+ });
39
push('/', '/', { locale });
40
};
41
0 commit comments