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
It's very often use case for global tools like WebAnalytics to create abstraction layer in app to do not stick to one solution. I try to do the same with Matomo module but I find it a bit cumbersome with current version. Issues I see is :
There is no way of providing configured abstract module which will internally use MatomoModule. My implementation was about to create WebAnalyticsModule.forRoot(config) with internally configuration of MatomoModule. What I tried was to provide MATOMO_CONFIGURATION separately and import MatomoModule only internally. The problem is that when I want to import my WebAnalyticsService which is facade for MatomoTracker to lazy loaded module I have to import WebAnalyticsModule again but it'll not work because MATOMO_CONFIGURATION has to be provided again otherwise I can't import MatomoModule again (it'll run init() method which needs MATOMO_CONFIGURATION). Solution would be to provide forRoot and forChild methods to MatomoModule
When I want to create WebAnalyticsService facade for MatomoTracker it can't be imported to services providedIn: 'root' because MatomoTracker is provided in module only (and needs MATOMO_CONFIGURATION). IMO it should be separate root service independent of MATOMO_CONFIGURATION, otherwise we need store support just to call tracker event in 'root' service.
The text was updated successfully, but these errors were encountered:
Hi,
It's very often use case for global tools like WebAnalytics to create abstraction layer in app to do not stick to one solution. I try to do the same with Matomo module but I find it a bit cumbersome with current version. Issues I see is :
There is no way of providing configured abstract module which will internally use MatomoModule. My implementation was about to create WebAnalyticsModule.forRoot(config) with internally configuration of MatomoModule. What I tried was to provide MATOMO_CONFIGURATION separately and import MatomoModule only internally. The problem is that when I want to import my WebAnalyticsService which is facade for MatomoTracker to lazy loaded module I have to import WebAnalyticsModule again but it'll not work because MATOMO_CONFIGURATION has to be provided again otherwise I can't import MatomoModule again (it'll run init() method which needs MATOMO_CONFIGURATION). Solution would be to provide forRoot and forChild methods to MatomoModule
When I want to create WebAnalyticsService facade for MatomoTracker it can't be imported to services providedIn: 'root' because MatomoTracker is provided in module only (and needs MATOMO_CONFIGURATION). IMO it should be separate root service independent of MATOMO_CONFIGURATION, otherwise we need store support just to call tracker event in 'root' service.
The text was updated successfully, but these errors were encountered: