ngx-matomo
ngx-matomo copied to clipboard
Initialize Matomo via Root Component
I have a single page application built in Angular5, I'm using ngx-matomo vs 0.1.4. this.matomoInjector.init('YOUR_MATOMO_URL', YOUR_SITE_ID); gives me 404. How can I solve the problem? It's my matomo_url or site_id incorrect? Shall I stick to ngx-matomo vs 0.1.4. or shall I move to another version? thanks
Hi,
If you get an error when injecting Matomo, the main reason is that the URL you provided in the init
call is incorrect. It must refer to an existing and accessible Matomo instance, since it's going to retrieve the Motomo tracker code from this URL.
Also, Angular 5 is now quite old, you may consider to switch to Angular 14. Upgrading may not be a huge amount of work if your application was "standard". ngx-matomo v0.x is for older apps (Angular 8 and before) and shall not be actively maintained. If you upgrage your app to Angular 14, aim for ngx-matomo v1.x (currently in RC2) which incorporates many improvements.
Thank you very much for your answer. Your reply will help me enforce the suggestion to the team to migrate Angular.
Regards Maria Luisa
Il giorno ven 17 giu 2022 alle ore 12:43 Arnaud Mouronval < @.***> ha scritto:
Hi,
If you get an error when injecting Matomo, the main reason is that the URL you provided in the init call is incorrect. It must refer to an existing and accessible Matomo instance, since it's going to retrieve the Motomo tracker code from this URL.
Also, Angular 5 is now quite old, you may consider to switch to Angular 14. Upgrading may not be a huge amount of work if your application was "standard". ngx-matomo v0.x is for older apps (Angular 8 and before) and shall not be actively maintained. If you upgrage your app to Angular 14, aim for ngx-matomo v1.x (currently in RC2) which incorporates many improvements.
— Reply to this email directly, view it on GitHub https://github.com/Arnaud73/ngx-matomo/issues/87#issuecomment-1158746087, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJPVNUWTZHCXK3NZBDOCNS3VPRJGNANCNFSM5Y6GFI6Q . You are receiving this because you authored the thread.Message ID: @.***>