EmmanuelRoux / ngx-matomo-client

Matomo analytics client for Angular applications
https://matomo.org/
MIT License
69 stars 13 forks source link

Make tracked url to lowercase #92

Open ChristophKind opened 1 month ago

ChristophKind commented 1 month ago

How can i configure that the tracked urls should all be converted to lowercase?

In native js I can. do this via _paq.push(['setCustomUrl', location.href.toLowerCase()]);

Regards Chris

EmmanuelRoux commented 1 month ago

Hi @ChristophKind

You can do so using a custom interceptor.

See Using custom interceptor in README.

Take a look at MySimpleInterceptor example: you can use the same pattern to call tracker.setCustomUrl(…) with your own logic.