Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IS-1940: Add amplitude #393

Merged
merged 5 commits into from
Jan 9, 2024
Merged

IS-1940: Add amplitude #393

merged 5 commits into from
Jan 9, 2024

Conversation

vetlesolgaard
Copy link
Contributor

@vetlesolgaard vetlesolgaard commented Jan 8, 2024

Hva har blitt lagt til✨🌈

  • Legger til amplitude for å kunne måle hvordan brukerene interagerer med oversikten.
  • Første måling lagt til her registerer sidebesøk for når bruker besøker "Min oversikt" eller "Enhetens oversikt".

@@ -9,6 +9,10 @@ export const erLokal = (): boolean => {
return window.location.host.indexOf('localhost') > -1;
};

export function isProd() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Husk å bytte til syfooversikt her ;)

@vetlesolgaard vetlesolgaard force-pushed the IS-1940-Add-amplitude branch from 5138e83 to 2fe530d Compare January 8, 2024 08:10
Comment on lines -26 to +36
let temp: any = null;
const localS = {
getItem() {
return temp;
},
setItem(key: any, value: any) {
temp = value;
},
};
function localStorage() {
let storage = {};
return {
getItem: function (key: string) {
return key in storage ? (storage as any)[key] : null;
},
setItem: function (key: string, value: any) {
(storage as any)[key] = value || '';
},
};
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Den forrige funksjonen her hentet hva som helst som lå i temp. Siden hverken set eller get funksjonen brukte key så ville en verdi ble satt og den verdien returnert for alle som prøvde å bruke localstorage.

@vetlesolgaard vetlesolgaard changed the title 🚧WIP🚧 IS-1940: Add amplitude IS-1940: Add amplitude Jan 9, 2024
@vetlesolgaard vetlesolgaard marked this pull request as ready for review January 9, 2024 09:21
@vetlesolgaard vetlesolgaard requested a review from a team as a code owner January 9, 2024 09:21
@vetlesolgaard vetlesolgaard merged commit f7b688b into master Jan 9, 2024
3 checks passed
@vetlesolgaard vetlesolgaard deleted the IS-1940-Add-amplitude branch January 9, 2024 12:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants