Trying to add page tracking
This commit is contained in:
@@ -1,15 +1,20 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import {AfterContentInit, Component, OnInit} from '@angular/core';
|
||||
import {AnalyticsService} from '../analytics.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-resume',
|
||||
templateUrl: './resume.component.html',
|
||||
styleUrls: ['./resume.component.css']
|
||||
})
|
||||
export class ResumeComponent implements OnInit {
|
||||
export class ResumeComponent implements AfterContentInit {
|
||||
private analytics: AnalyticsService;
|
||||
|
||||
constructor() { }
|
||||
constructor(analytics: AnalyticsService) {
|
||||
this.analytics = analytics;
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
ngAfterContentInit(): void {
|
||||
this.analytics.trackPageHit('Resume');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user