Skip to content

Commit

Permalink
Development: Remove analytics because it was not used
Browse files Browse the repository at this point in the history
  • Loading branch information
krusche committed Nov 29, 2024
1 parent 7d1a660 commit ca1beca
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 103 deletions.
35 changes: 0 additions & 35 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@
"papaparse": "5.4.1",
"pdf-lib": "1.17.1",
"pdfjs-dist": "4.8.69",
"posthog-js": "1.187.2",
"rxjs": "7.8.1",
"simple-statistics": "7.8.7",
"smoothscroll-polyfill": "0.4.4",
Expand Down
20 changes: 0 additions & 20 deletions src/main/webapp/app/core/posthog/analytics.service.ts

This file was deleted.

10 changes: 0 additions & 10 deletions src/main/webapp/app/shared/layouts/main/main.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { ProfileService } from 'app/shared/layouts/profiles/profile.service';
import { SentryErrorHandler } from 'app/core/sentry/sentry.error-handler';
import { ThemeService } from 'app/core/theme/theme.service';
import { DOCUMENT } from '@angular/common';
import { AnalyticsService } from 'app/core/posthog/analytics.service';
import { Subscription } from 'rxjs';
import { ExamParticipationService } from 'app/exam/participate/exam-participation.service';
import { CourseManagementService } from 'app/course/manage/course-management.service';
Expand Down Expand Up @@ -41,7 +40,6 @@ export class JhiMainComponent implements OnInit, OnDestroy {
private profileService: ProfileService,
private examParticipationService: ExamParticipationService,
private sentryErrorHandler: SentryErrorHandler,
private analyticsService: AnalyticsService,
private themeService: ThemeService,
@Inject(DOCUMENT)
private document: Document,
Expand All @@ -50,7 +48,6 @@ export class JhiMainComponent implements OnInit, OnDestroy {
private ltiService: LtiService,
) {
this.setupErrorHandling().then(undefined);
this.setupAnalytics().then(undefined);
}

private async setupErrorHandling() {
Expand All @@ -60,13 +57,6 @@ export class JhiMainComponent implements OnInit, OnDestroy {
});
}

private async setupAnalytics() {
this.profileService.getProfileInfo().subscribe((profileInfo) => {
// postHog is only activated if it was specified in the application.yml file
this.analyticsService.initAnalytics(profileInfo);
});
}

private getPageTitle(routeSnapshot: ActivatedRouteSnapshot): string {
const title: string = routeSnapshot.data['pageTitle'] ?? 'artemisApp';
if (routeSnapshot.firstChild) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@ export class ProfileInfo {
public inDevelopment: boolean;
public openApiEnabled?: boolean;
public sentry?: { dsn: string };
public postHog?: {
host?: string;
token: string;
};
public features: ActiveFeatureToggles;
public guidedTourMapping?: GuidedTourMapping;
public buildPlanURLTemplate: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ export class ProfileService {
profileInfo.ribbonEnv = profileInfo.ribbonEnv ?? '';

profileInfo.sentry = data.sentry;
profileInfo.postHog = data.postHog;
profileInfo.features = data.features;
profileInfo.buildPlanURLTemplate = data.buildPlanURLTemplate;
profileInfo.commitHashURLTemplate = data.commitHashURLTemplate;
Expand Down
32 changes: 0 additions & 32 deletions src/test/javascript/spec/core/post-hog-analytics.service.spec.ts

This file was deleted.

0 comments on commit ca1beca

Please sign in to comment.