Update Analytics to use Angularitics

This also supports the new Matomo setup.
This commit is contained in:
Cameron
2019-09-21 14:40:14 +00:00
parent 6d92dc4565
commit 1aa109ae52
11 changed files with 29 additions and 94 deletions

View File

@@ -1,17 +1,16 @@
import {AfterContentInit, Component, OnInit} from '@angular/core';
import {Component, OnInit} from '@angular/core';
import {ProjectService} from './project.service';
import {ProjectItem} from './project-item';
import {AnalyticsService} from '../analytics.service';
@Component({
selector: 'app-projects',
templateUrl: './projects.component.html',
styleUrls: ['./projects.component.css'],
})
export class ProjectsComponent implements OnInit, AfterContentInit {
export class ProjectsComponent implements OnInit {
projects: Array<ProjectItem>;
constructor(private projectService: ProjectService, private analytics: AnalyticsService) {
constructor(private projectService: ProjectService) {
}
ngOnInit(): void {
@@ -22,8 +21,4 @@ export class ProjectsComponent implements OnInit, AfterContentInit {
this.projectService.getProjects().then(projects => this.projects = projects);
}
ngAfterContentInit(): void {
this.analytics.trackPageHit('Projects');
}
}