Arnaud73 / ngx-matomo

Matomo (aka. Piwik) web analytics for Angular applications
MIT License
102 stars 47 forks source link

feat(SSR): Add SSR Support. #10

Closed VPecquerie closed 5 years ago

VPecquerie commented 5 years ago

Hello,

I had an issue when using ngx-matomo with SSR and Universal support. My solution is to wrap the MatomoInjector with a "isPlatformBrowser()" in order to prevent dom manipulation on server side.

I can't build it because there is no instruction on how to get a dist version working but i import all files in a separed projet and it's working.

Please give me any feedback. Thanks.

Arnaud73 commented 5 years ago

Thanks for the PR!

I'm still evaluating what would be best for SSR. I'll keep you posted.

Arnaud73 commented 5 years ago

Hi,

Sorry for the delay, I was not very active on the project these last months.

I'm almost OK to merge your PR, but a few things shall be changed:

If you do not have any time to make this modifications, I can do it myself. I just wanted to keep your commit in the project since you did all the required development on the subject.

Thanks :)

VPecquerie commented 5 years ago

Hi,

I will check it asap. Thanks for your feedback.

Vincent.

Arnaud73 commented 5 years ago

Hi Vincent,

Sorry, I did not see you rebased your branch sooner! ;) It's now merged.

Thanks a lot!

NiklasA commented 5 years ago

@Arnaud73 Hi, do you know when this version will be published? The current release in npm registry was published 4 month ago. Thank you in advance.

Arnaud73 commented 5 years ago

Hi @NiklasA, in fact SSR support will be delivered with release 1.0 that also includes an important rewrite of how the module is loaded. I'm planning to finish the work soon, however, family business keeps me away from the code more that I wish. If you are interested in beta-testing the future release (that already includes SSR support), let me know.