Articles on: Server Side

Creating Hashed email addresses (SHA256)

By creating a hash of an email address, the original email is converted into an unreadable format to ensure its security. Using a hashing method SHA-256, an email address is transformed into a fixed-length string of characters that cannot be easily reversed to reveal the original data.

For example, when an email address is hashed with SHA-256, it becomes a long, random-looking string of 64 digits code when displayed in hexadecimal format. This protects the original email. This is commonly used to secure sensitive information, especially in websites where user data needs to remain private.

In this document, we’ll show you how to create hashed email addresses using SHA256.

Let’s get started🚀

Create a Event Data Variable



To create hashed email addresses using SHA256, we first need to define a variable to store the email address we want to hash. For that, we will use the variable to hold the email address. This keeps the process simple and makes it easy to find the email address for hashing.

In this demonstration, we will show how to create the variable.


Add SHA256 Hasher Template



After creating the Event Data variable, now we will add the SHA256 hasher template in the GTM server container. This template converts the email address into a secure hashed format. By adding this template, the email address is changed into a secure, fixed string to protect the original data.

In this demonstration, we will explain how to add the SHA256 hasher template in your GTM workspace


Create a Variable for SHA256 Hashed



After adding the SHA256 Hasher Template, we will create a variable for the hashed email. This variable will be configured by linking it to the variable that we have created earlier in the Create an Event Data Variable. It will store the SHA256 hashed version of the email address, converting it into a secure and unreadable format.

In this demonstration, we will explain how to create and configure the SHA256 hasher variable.

Updated on: 28/01/2025

Was this article helpful?

Share your feedback

Cancel

Thank you!