From 81f0c98ae0a38d62e7ab194192b5147bcfefcab6 Mon Sep 17 00:00:00 2001 From: Mikhail Preyskurantov <5574159+mpreyskurantov@users.noreply.github.com> Date: Thu, 8 Aug 2024 19:37:45 +0300 Subject: [PATCH] prod --- src/app/analytics-events.service.ts | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/src/app/analytics-events.service.ts b/src/app/analytics-events.service.ts index 94f760b..5539d4b 100644 --- a/src/app/analytics-events.service.ts +++ b/src/app/analytics-events.service.ts @@ -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 || []; if(_paq.push) { const eventArgs = ['trackEvent', ...items]; - //_paq.push(eventArgs); - console.log(eventArgs); + _paq.push(eventArgs); } } }