Skip to main content
Skip table of contents

URL Filter Function - Transformation Functions

Enhancing Data Integrity and Privacy with Transformation Functions in JENTIS

In the ever-evolving digital landscape, data integrity and privacy stand as paramount pillars for businesses striving to maintain compliance while delivering personalized user experiences. JENTIS Data Capturing Platform introduces a powerful feature that underscores this commitment - Transformation Functions. This innovative functionality ensures that data, before being submitted through tags, is refined, anonymized, and standardized, thereby enhancing both data quality and user privacy.

Understanding Transformation Functions

Transformation Functions in JENTIS represent a sophisticated layer of data processing that operates whenever a tag is executed. Tags, the snippets of code designed to collect and transmit information based on specific triggers, play a crucial role in understanding user behavior and tailoring online experiences. However, raw data often requires refinement to meet the dual objectives of compliance and utility. This is where Transformation Functions come into play.

How It Works

The process begins when a tag is triggered. The tag accesses an input, typically a dynamic variable that holds the data of interest. If a Transformation Function is associated with this placeholder, the software automatically invokes the function.


The function then acts on the variable, transforming the data according to the specified logic before passing the refined output back to the tag.

With any tag you can apply any function of your account. Which comes with a lot of presets (MD5, SHA256 hash generation, toLowerCase, Trim, Anonymization, Pseudonymization, etc). But you can create your own functions. Which we will do in this article, too.

Applications of Transformation Functions

  1. Anonymizing Data: In an era where privacy regulations are stringent, the ability to anonymize data before it leaves the user's browser is invaluable. Transformation Functions can, for instance, hash personal identifiers, ensuring that the data collected complies with privacy laws like GDPR and CCPA.

  2. Uniform Data Formatting: Consistency in data format is crucial for accurate analysis and reporting. Transformation Functions can standardize data formats—converting strings to lowercase, trimming whitespace, or formatting dates—thereby ensuring uniformity across the data collected.

  3. Custom Data Manipulation: Beyond standard transformations, these functions offer the flexibility to perform custom data manipulations tailored to specific business needs. Whether it's calculating new values, concatenating strings, or even applying conditional logic, the possibilities are vast.

Create a URL Filter Function

Let’s create our own first transformation function. For this we assume that a URL value needs some filtering for compliance and privacy. Hence why it will remove all URL query parameter values that contain a @ character or a parameter key that matches gclid (Google Click ID). Which commonly are considered PII (personal information).

Jump to the “JENTIS Tag Manager: Functions” section to add a new transformation function.


Use the following code in your new function. You can customize it to remove certain values (if they contain a keyword, such as “@”) or decide to remove certain parameters that match a key name (“gclid”).

  var final_output = input;
  var REMOVE_VALUES = ["@"]; //remove param values if containing a string/character from this list
  var REMOVE_PARAS  = ["gclid"]; //remove parameter value if key matches
    var in_url = new URL(input);
    var params_output = [];
    for(const [key, value] of in_url.searchParams.entries()) { // each 'entry' is a [key, value] tupple
      var ret_key = key;
      var ret_val = value;
      console.log("scanning keyvalue: "+key+value)
      //remove values on match
      REMOVE_VALUES.forEach(filterItem => {
        if(value.indexOf(filterItem) >= 0)
          ret_val = "value_masked";
      REMOVE_PARAS.forEach(filterItem => {
        if(key == filterItem)
          ret_val = "value_masked";
    final_output = in_url.origin+in_url.pathname+"?"+params_output.join("&")+in_url.hash;


  return final_output;

Now you can apply this function with any tag in your JENTIS tags. Make sure to provide a proper URL variable to the function and it will do it’s magic and remove all sensitive data you flagged in your function.


Transformation Functions within JENTIS Tag Management Software are a game-changer for businesses seeking to navigate the complexities of data collection in a privacy-conscious world. By providing the tools to refine, anonymize, and standardize data at the point of collection, JENTIS empowers businesses to uphold the highest standards of data integrity and privacy. As businesses continue to leverage data to drive decisions, the importance of such functionalities will only grow, making JENTIS an indispensable tool in the digital marketer's arsenal.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.