SHA 256 Encryption Guide

SHA 256 Encryption Guide

Document Purpose

Implementation guide for the dev team to set up cookies for Personally Identifiable Information (PII) such as
email, phone number, first name, and last name. The information will be encoded using SHA256 format.


Step 1: Collect PII

Whenever users add the phone_number, email, first_name and last_name details during checkout journey,
collect and store it in a variable.
In the Example ‘+971 567891234’, you need to remove the ‘+’ sign and store the remaining phone number.
Value to be stored: 971567891234
Whenever users add the Email details during user journey, collect email address, and store it in a variable.
Normalize email addresses by trimming leading and trailing whitespace and converting all characters to
lowercase before hashing.
Whenever users add the First name and last name details during user journey, collect both the data and store
it in separate variable..

Step 2: Hashed Data

Once the First Party Data is collected, it needs to be hashed using the SHA256 encryption method.
For guidance on hashing information using SHA256 encryption encoding in JavaScript, please refer to the
reference link provided below.

SHA256 encryption
The table below illustrates examples of hashed and unhashed values for different parameters:


    • Related Articles

    • GTM Access Sharing Guide

      This document provides a step-by-step guide for the GTM access sharing. Follow the below steps for GTM access sharing: Step 1: Got to https://tagmanager.google.com/ Step 2: Click on Settings icon for the GTM container which client wants to share the ...
    • Implementation Guide: TikTok Events API for Online Events

      Introduction This comprehensive resource is designed to assist marketers in integrating and utilizing the TikTok Events API effectively using Datahash. Overview The TikTok Events API offers marketers the ability to effortlessly incorporate TikTok’s ...
    • Implementation Guide: TikTok Events API for Offline Events

      Introduction This comprehensive resource is designed to assist marketers in integrating and utilizing the TikTok Events API for Offline Events effectively using Datahash. Overview TikTok’s Offline Events API enables advertisers to gauge the impact of ...
    • Implementation Guide: TikTok Events API for Online Events [Getting Started]

      Introduction This comprehensive resource is designed to assist marketers in integrating and utilizing the TikTok Events API effectively using Datahash. Overview The TikTok Events API offers marketers the ability to effortlessly incorporate TikTok’s ...
    • How does encryption take place using Datahash?

      Datahash script replacing the base browser pixel code in your tag manager hashes the data on the client server itself, before leaving the user browser. This data is non-decryptable and is utilized by Snap by encrypting their own database for user ...