EmmanuelRoux / ngx-matomo-client

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

Make tracked url to lowercase #92

Open ChristophKind opened 4 months ago

ChristophKind commented 4 months 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 4 months 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.