major update angular

This commit is contained in:
2026-03-11 20:58:58 +01:00
parent 79c71fcf45
commit 1294f0f07c
27 changed files with 965 additions and 433 deletions

View File

@@ -0,0 +1,27 @@
import { Injectable } from '@angular/core';
import { OpenPanel } from '@openpanel/web';
@Injectable({
providedIn: 'root'
})
export class AnalyticsService {
constructor() {
OpenPanel.init({
clientId: 'DEINE_CLIENT_ID', // Aus dem OpenPanel Dashboard
trackScreenViews: true, // Automatisches Tracking von Routenwechseln
trackOutgoingLinks: true,
url: 'https://api.deine-coolify-domain.de' // WICHTIG: Deine eigene API URL!
});
}
// Methode für benutzerdefinierte Events (das "Brett")
trackEvent(name: string, properties?: object) {
openpanel.track(name, properties);
}
// Für deinen Kunden-Login: User identifizieren
identifyUser(userId: string, traits?: object) {
openpanel.identify(userId, traits);
}
}