-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fb4680a
commit 81f0c98
Showing
1 changed file
with
4 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,19 @@ | ||
import { Injectable } from '@angular/core'; | ||
//import { environment } from '../environments/environment'; | ||
import { environment } from '../environments/environment'; | ||
|
||
@Injectable({ | ||
providedIn: 'root' | ||
}) | ||
|
||
export class AnalyticsEventsService { | ||
trackEvent( | ||
/* | ||
eventCategory: string, | ||
eventAction: string, | ||
eventName: string = null, | ||
eventValue: string = null, | ||
*/ | ||
...items | ||
): void { | ||
|
||
//if(!environment.production) return; | ||
trackEvent(...items): void { | ||
if(!environment.production) return; | ||
|
||
const _paq = (window as any)._paq || []; | ||
Check warning on line 12 in src/app/analytics-events.service.ts GitHub Actions / test
|
||
|
||
if(_paq.push) { | ||
const eventArgs = ['trackEvent', ...items]; | ||
//_paq.push(eventArgs); | ||
console.log(eventArgs); | ||
_paq.push(eventArgs); | ||
} | ||
} | ||
} |