web/satellite: add new events to segment
We'd like more data to help us figure out drop off points. Change-Id: Ida624188b76d14e6349afb48e72a12a52553e61d
This commit is contained in:
parent
5351c43757
commit
c884f327c8
@ -449,7 +449,10 @@ import FileEntry from "./FileEntry.vue";
|
||||
import BreadCrumbs from "./BreadCrumbs.vue";
|
||||
import FileModal from "./FileModal.vue";
|
||||
import FileShareModal from "./FileShareModal.vue";
|
||||
|
||||
import { AnalyticsHttpApi } from '@/api/analytics';
|
||||
import { BrowserFile } from "@/types/browser.ts";
|
||||
import { AnalyticsEvent } from '@/utils/constants/analyticsEventNames';
|
||||
|
||||
// @vue/component
|
||||
@Component({
|
||||
@ -467,6 +470,8 @@ export default class FileBrowser extends Vue {
|
||||
public deleteConfirmation = false;
|
||||
public fetchingFilesSpinner = false;
|
||||
|
||||
private readonly analytics: AnalyticsHttpApi = new AnalyticsHttpApi();
|
||||
|
||||
/**
|
||||
* Check if the s3 client has been initialized in the store.
|
||||
*/
|
||||
@ -687,6 +692,7 @@ export default class FileBrowser extends Vue {
|
||||
*/
|
||||
public async upload(e: Event): Promise<void> {
|
||||
await this.$store.dispatch("files/upload", e);
|
||||
this.analytics.eventTriggered(AnalyticsEvent.OBJECT_UPLOADED);
|
||||
const target = e.target as HTMLInputElement;
|
||||
target.value = "";
|
||||
}
|
||||
|
@ -28,6 +28,8 @@ import { Component, Vue } from 'vue-property-decorator';
|
||||
|
||||
import { RouteConfig } from "@/router";
|
||||
import { MetaUtils } from "@/utils/meta";
|
||||
import { AnalyticsEvent } from "@/utils/constants/analyticsEventNames";
|
||||
import { AnalyticsHttpApi } from "@/api/analytics";
|
||||
|
||||
import {ACCESS_GRANTS_ACTIONS} from "@/store/modules/accessGrants";
|
||||
import {APP_STATE_MUTATIONS} from "@/store/mutationConstants";
|
||||
@ -50,6 +52,8 @@ import Icon from '@/../static/images/onboardingTour/apiKeyStep.svg';
|
||||
export default class APIKey extends Vue {
|
||||
private worker: Worker;
|
||||
|
||||
private readonly analytics: AnalyticsHttpApi = new AnalyticsHttpApi();
|
||||
|
||||
public satelliteAddress: string = MetaUtils.getMetaContent('satellite-nodeurl');
|
||||
public isLoading = true;
|
||||
public restrictedKey = '';
|
||||
@ -87,6 +91,8 @@ export default class APIKey extends Vue {
|
||||
try {
|
||||
this.restrictedKey = await this.generateRestrictedKey();
|
||||
|
||||
this.analytics.eventTriggered(AnalyticsEvent.API_KEY_GENERATED);
|
||||
|
||||
await this.$store.commit(APP_STATE_MUTATIONS.SET_ONB_API_KEY, this.restrictedKey);
|
||||
} catch (error) {
|
||||
await this.$notify.error(error.message)
|
||||
@ -177,4 +183,4 @@ export default class APIKey extends Vue {
|
||||
margin: 20px 0;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
@ -8,4 +8,6 @@ export enum AnalyticsEvent {
|
||||
EXTERNAL_LINK_CLICKED = 'External Link Clicked',
|
||||
PATH_SELECTED = 'Path Selected',
|
||||
LINK_SHARED = 'Link Shared',
|
||||
OBJECT_UPLOADED = 'Object Uploaded',
|
||||
API_KEY_GENERATED = 'API Key Generated',
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user