Some dimensions were not set on page load

This commit is contained in:
Misode
2022-05-09 02:38:39 +02:00
parent e63b4839dc
commit 2593172855
4 changed files with 8 additions and 8 deletions

View File

@@ -11,7 +11,6 @@ export namespace Analytics {
const DIM_THEME = 1
const DIM_VERSION = 3
const DIM_LANGUAGE = 4
const DIM_PREVIEW = 5
const DIM_GENERATOR = 6
const DIM_PREFERS_COLOR_SCHEME = 7
@@ -64,15 +63,11 @@ export namespace Analytics {
})
}
export function setPreview(preview: string) {
dimension(DIM_PREVIEW, preview)
event(ID_GENERATOR, 'set-preview', preview)
}
export function setGenerator(file_type: string) {
export function setGenerator(file_type: string, version: string) {
dimension(DIM_GENERATOR, file_type)
gtag('event', 'use_generator', {
file_type,
version,
})
}