In my Angular4+ app, I'm using matrix notation for URL routing params. Google Analytics strips URLs up to first encountered ';'. I found this but it doesn't help much.
Is there a way to make GA read full URLs like this or my only option is to turn them to queryParams?
Google Analytics has always offered means to force the page path being collected to an explicit value, overriding the default parsing based on location.pathname+location.search
Just set a value for the page parameter.
You'll find an example here https://developers.google.com/analytics/devguides/collection/analyticsjs/single-page-applications
However, first check which version of the Google Analytics tracker code you are using, to get the right syntax applicable to that version.
Or prefer to push the value to Google Tag Manager, through a dataLayer.push('pagePathVariableName','/example-page;field1=value1;field2=value2;field3=value3');
call and do the mapping in GTM
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With