AnalyticsHtml constructor

AnalyticsHtml(
  1. String trackingId,
  2. String applicationName,
  3. String applicationVersion, {
  4. String? analyticsUrl,
  5. Duration? batchingDelay,
})

Implementation

AnalyticsHtml(
  String trackingId,
  String applicationName,
  String applicationVersion, {
  String? analyticsUrl,
  Duration? batchingDelay,
}) : super(
        trackingId,
        HtmlPersistentProperties(applicationName),
        HtmlPostHandler(),
        applicationName: applicationName,
        applicationVersion: applicationVersion,
        analyticsUrl: analyticsUrl,
        batchingDelay: batchingDelay,
      ) {
  var screenWidth = window.screen!.width;
  var screenHeight = window.screen!.height;

  setSessionValue('sr', '${screenWidth}x$screenHeight');
  setSessionValue('sd', '${window.screen!.pixelDepth}-bits');
  setSessionValue('ul', window.navigator.language);
}