You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
provideGoogleAnalytics('ga4-tag-id') // ⬅️ Google Analytics provider
49
48
]
50
49
}).catch(err=>console.error(err));
51
50
```
51
+
You can also specify additional settings using the second optional parameter: `provideGoogleAnalytics('ga4-tag-id', settings)`.
52
+
See [IGoogleAnalyticsSettings](https://github.com/hakimio/ngx-google-analytics/blob/master/projects/ngx-google-analytics/src/lib/interfaces/i-google-analytics-settings.ts)
53
+
interface for more information about available settings.
52
54
- Add `NgxGoogleAnalyticsModule` to your app component's imports:
53
55
54
56
`app.component.ts`
@@ -61,8 +63,7 @@ import {NgxGoogleAnalyticsModule} from '@hakimio/ngx-google-analytics';
61
63
styleUrls: ['./app.component.css'],
62
64
standalone: true,
63
65
imports: [
64
-
NgxGoogleAnalyticsModule
65
-
// ^^^^^^^^^^^^^^^^^^^^^
66
+
NgxGoogleAnalyticsModule// ⬅️ Google Analytics module
66
67
]
67
68
})
68
69
exportclassAppComponent {}
@@ -84,17 +85,18 @@ import {NgxGoogleAnalyticsModule, provideGoogleAnalytics} from '@hakimio/ngx-goo
provideGoogleAnalytics('ga4-tag-id') // ⬅️ Google Analytics provider
93
92
],
94
93
bootstrap: [AppComponent]
95
94
})
96
95
exportclassAppModule {}
97
96
```
97
+
You can also specify additional settings using the second optional parameter: `provideGoogleAnalytics('ga4-tag-id', settings)`.
98
+
See [IGoogleAnalyticsSettings](https://github.com/hakimio/ngx-google-analytics/blob/master/projects/ngx-google-analytics/src/lib/interfaces/i-google-analytics-settings.ts)
99
+
interface for more information about available settings.
0 commit comments