Skip to content

Commit

Permalink
Amplitude: Slår sammen til bare en kategori for nedtrekksmeny (#471)
Browse files Browse the repository at this point in the history
  • Loading branch information
PerOlavM authored Nov 7, 2024
1 parent 43d1af9 commit a6e7928
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
2 changes: 0 additions & 2 deletions packages/client/src/analytics/amplitude.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@ type EventData = Record<string, any>;
type AnalyticsCategory =
| "dekorator-header"
| "dekorator-footer"
| "dekorator-brukermeny"
| "dekorator-meny"
| "dekorator-sok"
| "dekorator-varsler"
| "dekorator-sprakvelger";

Expand Down
7 changes: 1 addition & 6 deletions packages/client/src/views/dropdown-menu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,6 @@ const analyticsLabel = {
user: "[Brukernavn]",
search: "Søk",
} as const;
const analyticsCategory = {
menu: "dekorator-meny",
user: "dekorator-brukermeny",
search: "dekorator-sok",
} as const;

class DropdownMenu extends HTMLElement {
private button!: HTMLElement;
Expand Down Expand Up @@ -46,7 +41,7 @@ class DropdownMenu extends HTMLElement {
eventName: force ? "accordion åpnet" : "accordion lukket",
context: window.__DECORATOR_DATA__.params.context,
label: this.menuType && analyticsLabel[this.menuType],
category: this.menuType && analyticsCategory[this.menuType],
category: "dekorator-meny",
komponent: "DropDownMenu",
});
this.isOpen = force;
Expand Down

0 comments on commit a6e7928

Please sign in to comment.