Can't make it work with Angular 18 SSR

Hi,

I’m trying to get PiWik Pro working on an Angular 18 SSR setup. I’ve added the following as per instructions:

Within the app.module

NgxPiwikProModule.forRoot('my-analytics-key' , 'https://my.container'),
NgxPiwikProRouterModule,

And the following privacy settings within my prvacy policy page.

<div id='ppms_cm_privacy_settings' class='ppms_cm_privacy_settings_widget' data-editor-centralize='true' data-main-container='true' data-root='true'> ... left out ...</div>

However I’m never presented with the consent banner where I can accept/decline my consent. And the “Manage Settings” button doesn’t work by popping up the consent banner.

When I do the same for a non-ssr angular application everything works just fine and as expected.

Any ideas, what I’m missing?

Regards,

Hi @iprins,

I’ll try to help you with your problem. Please make sure that you’ve followed the exact instructions from: Administration → Installation → Angular or from Angular.
After that, you should have added at least two modules to the ‘imports’ section in ‘app.module.ts’ → ‘BrowserModule’ and ‘NgxPiwikProModule’

If everything is set up correctly, please check the following options and let me know:

  • Go to Administration → Page Settings → Privacy and Check if ‘Ask visitors for consent’ is checked
  • Try removing the privacy settings section from the code

Regards,
Eryk