Skip to content

Commit f88549c

Browse files
Merge pull request #3537 from NativeScript/vladimirov/fix-analytics-logs
fix(analytics): Message for tracking in GA is always printed
2 parents 2e866b2 + 0eadbc4 commit f88549c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/services/analytics/analytics-service.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ export class AnalyticsService extends AnalyticsServiceBase {
5858
gaSettings.customDimensions[GoogleAnalyticsCustomDimensions.client] = this.$options.analyticsClient || (isInteractive() ? AnalyticsClients.Cli : AnalyticsClients.Unknown);
5959

6060
const googleAnalyticsData: IGoogleAnalyticsTrackingInformation = _.merge({ type: TrackingTypes.GoogleAnalyticsData, category: AnalyticsClients.Cli }, gaSettings);
61+
this.$logger.trace("Will send the following information to Google Analytics:", googleAnalyticsData);
6162
return this.sendMessageToBroker(googleAnalyticsData);
6263
}
6364
}
@@ -99,8 +100,6 @@ export class AnalyticsService extends AnalyticsServiceBase {
99100
customDimensions
100101
};
101102

102-
this.$logger.trace("Will send the following information to Google Analytics:", googleAnalyticsEventData);
103-
104103
await this.trackInGoogleAnalytics(googleAnalyticsEventData);
105104
}
106105

0 commit comments

Comments
 (0)