/**
 * System that just uses the legacy RendererAnalytics until we do away with GA.
 */ import { IAnalytics , IAnalyticsUser , IEventArgs , IPageEvent , TraitsMap } from "../IAnalytics" ; export class OnlineAnalytics implements IAnalytics { public constructor ( private readonly delegate ) { } public event ( evt ) { if ( navigator . onLine ) { this . delegate . event ( evt ) ; } } public event2 ( event , data ? ) { if ( navigator . onLine ) { this . delegate . event2 ( event , data ) ; } } public page ( event ) { if ( navigator . onLine ) { this . delegate . page ( event ) ; } } public identify ( user ) { if ( navigator . onLine ) { this . delegate . identify ( user ) ; } } public traits ( map ) { if ( navigator . onLine ) { this . delegate . traits ( map ) ; } } public version ( version ) { if ( navigator . onLine ) { this . delegate . version ( version ) ; } } public heartbeat ( ) { if ( navigator . onLine ) { this . delegate . heartbeat ( ) ; } } public logout ( ) { if ( navigator . onLine ) { this . delegate . logout ( ) ; } } }