@@ -50,7 +50,7 @@ export class Analytics implements AnalyticsMethods {
5050 requireOptIn ?: boolean ,
5151 disableSessionTracking ?: boolean ,
5252 private productionDomains ?: string [ ] ,
53- private enableDebugging : boolean = false ,
53+ private enableDebugging : boolean = false
5454 ) {
5555 this . _optedIn = ! requireOptIn ;
5656 this . _sessionTrackingEnabled = ! disableSessionTracking ;
@@ -67,17 +67,12 @@ export class Analytics implements AnalyticsMethods {
6767 }
6868
6969 // Don't fire analytics for non-production domains, unless debug enabled
70- if (
71- ! isProduction ( ...( this . productionDomains ?? [ ] ) ) &&
72- ! this . getDebugEnabled ( )
73- ) {
70+ if ( ! isProduction ( ...( this . productionDomains ?? [ ] ) ) && ! this . getDebugEnabled ( ) ) {
7471 console . warn ( "Yext Analytics disabled for non-production domains" ) ;
7572 return ;
7673 }
7774
78- const region = getPartition (
79- this . templateData . document . businessId ,
80- ) as Region ;
75+ const region = getPartition ( this . templateData . document . businessId ) as Region ;
8176
8277 const config : AnalyticsConfig = {
8378 authorizationType : "apiKey" ,
@@ -102,11 +97,7 @@ export class Analytics implements AnalyticsMethods {
10297 }
10398
10499 private canTrack ( ) : boolean {
105- return (
106- getRuntime ( ) . name === "browser" &&
107- this . _optedIn &&
108- ! ! this . _analyticsEventService
109- ) ;
100+ return getRuntime ( ) . name === "browser" && this . _optedIn && ! ! this . _analyticsEventService ;
110101 }
111102
112103 /** {@inheritDoc AnalyticsMethods.identify } */
0 commit comments