Skip to content

Commit

Permalink
feat(providers): move gst to the startTracking() style
Browse files Browse the repository at this point in the history
  • Loading branch information
scttcper committed Aug 30, 2018
1 parent df496ce commit 09276a9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/lib/providers/gst/gst.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ export class GoogleGlobalSiteTagDefaults implements GoogleGlobalSiteTagSettings
@Injectable()
export class Angulartics2GoogleGlobalSiteTag {

constructor(
protected angulartics2: Angulartics2,
) {
constructor(protected angulartics2: Angulartics2) {
const defaults = new GoogleGlobalSiteTagDefaults;
// Set the default settings for this module
this.angulartics2.settings.gst = { ...defaults, ...this.angulartics2.settings.gst };
}

startTracking(): void {
this.angulartics2.pageTrack
.pipe(this.angulartics2.filterDeveloperMode())
.subscribe((x) => this.pageTrack(x.path));
Expand Down

0 comments on commit 09276a9

Please sign in to comment.