You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(analytics): write analytics data to passed file
Write analytics data to a file passed as `--analyticsLogFile`. The file will contain timestamp when the action is executed and what is the data passed to analytics.
Also add some additional logging to the file, so when something fails, it will be easier for diagnostics.
In case `--analyticsLogFile` is not passed, information will not be tracked.
this.analyticsLoggingService.logData({type: AnalyticsLoggingMessageType.Error,message: `Unable to track information ${JSON.stringify(trackInfo)}. Error is: ${e}`});
this.analyticsLoggingService.logData({message: `Initializing Google Analytics visitor for id: ${gaTrackingId} with clientId: ${this.clientId}.`});
29
32
constvisitor=ua({
30
33
tid: gaTrackingId,
31
34
cid: this.clientId,
@@ -34,9 +37,20 @@ export class GoogleAnalyticsProvider implements IGoogleAnalyticsProvider {
34
37
},
35
38
requestOptions: {
36
39
proxy
37
-
}
40
+
},
41
+
https: true
38
42
});
39
43
44
+
this.analyticsLoggingService.logData({message: `Successfully initialized Google Analytics visitor for id: ${gaTrackingId} with clientId: ${this.clientId}.`});
0 commit comments