Skip to content

Commit

Permalink
prod
Browse files Browse the repository at this point in the history
  • Loading branch information
mpreyskurantov committed Aug 8, 2024
1 parent fb4680a commit 81f0c98
Showing 1 changed file with 4 additions and 14 deletions.
18 changes: 4 additions & 14 deletions src/app/analytics-events.service.ts
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

View workflow job for this annotation

GitHub Actions / test

Unexpected any. Specify a different type

Check warning on line 12 in src/app/analytics-events.service.ts

View workflow job for this annotation

GitHub Actions / test

Unexpected any. Specify a different type

if(_paq.push) {
const eventArgs = ['trackEvent', ...items];
//_paq.push(eventArgs);
console.log(eventArgs);
_paq.push(eventArgs);
}
}
}

0 comments on commit 81f0c98

Please sign in to comment.