Trying to integrate Google Analytics ( http://ionicframework.com/docs/v2/native/google-analytics/ ) into my app, followed this tutorial as the docs didn't really have any sort of implementation instructions: https://www.thepolyglotdeveloper.com/2016/03/use-google-analytics-in-an-ionic-2-android-and-ios-app/
However, when I run my app in Simulator I get the following error while compiling:
TypeScript error: app/app.ts(21,14): Error TS2339: Property 'analytics' does not exist on type 'Window'.
Any ideas?
the sample you are using is not using typescript or the ionic-native module.
here is a project you can look at https://github.com/aaronksaunders/GAProject
in
app.ts
import {StatusBar, GoogleAnalytics} from 'ionic-native';
also you should access the module this way