Skip to content

Commit

Permalink
style: Revise tracked events
Browse files Browse the repository at this point in the history
  • Loading branch information
arildm committed Oct 9, 2024
1 parent 16546d2 commit f797aeb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/corpus/exports/exports.composable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export default function useExports(corpusId: string) {
}

async function downloadResult() {
matomo?.trackEvent("Corpus result", "Download export archive", corpusId);
matomo?.trackEvent("Corpus", "Download", "Export archive");
const data = await mink.downloadExports(corpusId).catch(alertError);
if (!data) return;
downloadFile(data, getDownloadFilename());
Expand All @@ -38,7 +38,7 @@ export default function useExports(corpusId: string) {

async function downloadResultFile(path: string) {
const filename = path.split("/").pop()!;
matomo?.trackEvent("Corpus result", "Download export file", filename);
matomo?.trackEvent("Corpus", "Download", "Export file");
const data = await mink
.downloadExportFiles(corpusId, path)
.catch(alertError);
Expand Down
8 changes: 4 additions & 4 deletions src/corpus/job/job.composable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,27 +26,27 @@ export default function useJob(corpusId: string) {
}

async function runJob() {
matomo?.trackEvent("Corpus", "Run annotation", corpusId);
matomo?.trackEvent("Corpus", "Annotation", "Start");
const info = await mink.runJob(corpusId).catch(alertError);
corpus.value.status = info.job;
}

async function installKorp() {
matomo?.trackEvent("Tool", "Install corpus in Korp", corpusId);
matomo?.trackEvent("Corpus", "Tool install", "Korp");
const info = await mink.installKorp(corpusId).catch(alertError);
if (!info) return;
corpus.value.status = info.job;
}

async function installStrix() {
matomo?.trackEvent("Tool", "Install corpus in Strix", corpusId);
matomo?.trackEvent("Corpus", "Tool install", "Strix");
const info = await mink.installStrix(corpusId).catch(alertError);
if (!info) return;
corpus.value.status = info.job;
}

async function abortJob() {
matomo?.trackEvent("Corpus", "Abort annotation", corpusId);
matomo?.trackEvent("Corpus", "Annotation", "Abort");
await mink.abortJob(corpusId).catch(alertError);
await loadJob();
}
Expand Down

0 comments on commit f797aeb

Please sign in to comment.