Closed romainmenke closed 2 years ago
The easiest method to do that would be to copy the JS snippet and remove the parameters from the URL that's sent to us here: https://github.com/pirsch-analytics/pirsch/blob/master/js/pirsch.js#L88
You would then have to host the JS file yourself. I would recommend minifying it as we do in the package.json
.
Here is a replacement for line 88 that will remove all query parameters:
"&url=" + encodeURIComponent((location.href.includes('?') ? location.href.split('?')[0] : location.href).substring(0, 1800)) +
Although we can make this change (we would also omit referrer
) we would prefer not to host our own version.
As an agency we have projects that can last for ±10 years. The benefit of a hosted snippet for Pirsch is that it can be updated by you in case there is an API change.
We are looking for a low maintenance and maximally compliant service to gather minimal usage statistics.
What's the reason for this feature request? You could also just ignore the UTM panels on the dashboard. I would rather not inflate the script with too many configuration options.
Also, we don't make API-breaking changes. Should we ever rebuild the page view endpoint, we would publish it as /api/v2/...
instead of replacing the current one.
the removal of any parameters contained in the collected URLs (e.g. UTMs, but also URL parameters allowing internal routing of the site);
This guideline is why we would like not to send any query params to any 3rd party.
I'll add an option for it.
I have added three new options for the scripts that will be made available later today:
You can simply add them to the script like this:
<script defer type="text/javascript" src="https://api.pirsch.io/pirsch.js"
id="pirschjs"
data-code="YOUR_IDENTIFICATION_CODE"
data-disable-query></script>
Thank you so much for this @Kugelschieber
We really appreciate that you are open to making this change and for rolling it out so quickly.
see : https://github.com/pirsch-analytics/pirsch/issues/95
We would prefer it if campaign related url params added by 3rd parties were not send to Pirsch. Is this something that can be configured in the client side script?