Anonymizer

Anonymize incoming requests by removing or transforming request parameters

Description

Anonymizer is an add-on to remove or transform certain request parameters to prevent them from being send to the tracking platform.

It's mainly GA4-focused, but it can work with all the requests.

It can handle the IP address, request headers and query string parameters.

There is a list of default headers and query string parameters to anonymize, but you can also add custom ones to suit your needs.


Implementation

To enable this add-on, go to your container on sprtags.io > Add-ons > Anonymizer.

Select the parameters you want to anonymize and click on save.

In this case, the last octet from the IP address headers and the uid parameter will be removed from the query string.


Anonymizer screenshot

To use the Anonymizer add-on, the requests that need to be anonymized must be sent to the normal path you would be sending them to but starting by /anonymize/your_path/. After the anonymizing process is done /anonymize/your_path/ will be removed automatically and the request will go to /your_path/


Here we have 2 sample requests, one with Anonymizer enabled and one without it:

Anonymizer disabled



curl -H \ 'x-gtm-server-preview:{Your X-Gtm-Server-Preview HTTP header}'\ 'https://{your_tagging_url}/g/collect?v=2&en=page_view&tid=G-1234&uid=12345678'

Anonymizer enabled:


curl -H \ 'x-gtm-server-preview:{Your X-Gtm-Server-Preview HTTP header}'\ 'https://{your_tagging_url}/anonymize/g/collect?v=2&en=page_view&tid=G-1234&uid=12345678'

Checkout out our How-To page to:
  • find your tagging url
  • X-GTM-Server-Preview HTTP header
  • execute curl commands

In the screenshot below, we can observe the result of the non-anonymized one on the left and the anonymized one on the right:

As you can observe, on the right the last octet of the IP addresses is set to 000 and the uid parameter of the url has been removed.


Anonymizer screenshot