angular-module-for-google-analytics
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

Angular Module for Google Analytics

Easily add Google Analytics tracking to your Angular based project.

Getting started:

npm i angular-module-for-google-analytics

Then in your app.module.ts:

@NgModule({
    imports: [
        AnalyticsModule,
    ]
})
export class AppModule {}

And in your main component (usually app.component.ts):

@Component({
    selector: 'app-root',
    templateUrl: './app.component.html',
    styleUrls: ['./app.component.scss']
})
export class AppComponent implements OnInit {

    constructor(
        private analytics: AnalyticsService,
    ) {

    }

    ngOnInit() {
        this.analytics.init("UA-123456");
    }
}

Readme

Keywords

none

Package Sidebar

Install

npm i angular-module-for-google-analytics

Weekly Downloads

0

Version

0.0.2

License

MIT

Unpacked Size

56.5 kB

Total Files

24

Last publish

Collaborators

  • dzhuneyt