version [1.0.3] (https://www.npmjs.com/package/ng2-google-analytics/v/1.0.3) Tested on Angular 6+
For Angular 2 - 5 projects use version [0.2.0] (https://www.npmjs.com/package/ng2-google-analytics/v/0.2.0)
Read my article: [Enable Google Analytics in Angular2+ Projects] (https://kumarvinay.com/enable-google-analytics-in-angular2-projects/)
ng build ng2-google-analytics