Installation with Angular (v13) app

  • I installed @piwikpro/ngx-piwik-pro": “^0.1.1”
  • declared the module in my main module app.module.ts:
    NgxPiwikProModule.forRoot(environment.piwik.siteId, environment.piwik.appUrl),
    NgxPiwikProRouterModule,
  • In a component I injected the piwik services:
    private customEventsService: CustomEventsService,
    private pageViewsService: PageViewsService
  • I tried to track a page view:
    this.pageViewsService.trackPageView(‘my_page_title’);

I always have the following error:
Error: _paq is not available
at PaqService.push (piwikpro-ngx-piwik-pro.mjs:164:19)
at PageViewsService.trackPageView (piwikpro-ngx-piwik-pro.mjs:190:25)

can you help?

Hello,

Thank you very much for your message. I have taken a closer look at the problem you described however I am having a hard time reproducing it. I would like to ask if you are able to provide the minimal code that contains the error you reported? At the same time, are you able to check if the example that is in our repository also reports such an error?

We will keep in touch.

Thank you for your time,
I’ve just found the root cause of this issue that is stupid finally… I have a ad blocker on my browser and it seems that’s it that block the right operation.
Sorry for that.