Hashed email (eid)
A hashed email is a normalized and SHA-256 hashed string containing the email address of the logged-in user obtained via custom login or login via Seznam, Google, Facebook, MojeID etc.
The website operator (advertiser or partner) has full control over the data and is responsible for the data provided to Seznam and may only send user data if it has the user's explicit consent to do so in accordance with the current legislation.
Hashing process
- Remove the whitespace from the user's email (before and after)
- Convert it to lower case
- Convert it to a UTF-8 encoded string
- Encrypt it with the SHA-256 algorithm
- Convert it to a hexadecimal string
We have prepared examples of codes for use in different languages.
If the services you use don't allow you to use hashing, or you don't want to use it for any other reason, you can leave it to Seznam. Send the email in the given parameter (eid) and the retargeting or conversion code (or their script) will hash the email for you according to the mentioned procedure.
If you use Seznam Login, you only need to send this eid parameter in the code. No need to send said or secid.
WorkFlow
Once you have successfully authenticated and authorised the logged-in user on your site, you will obtain an email address. Process it as described above or you can leave this process to a JS script from Seznam.
- If you do this on your backend (PHP, Python, ASP, etc.), you need to pass this value to the frontend - i.e. to the HTML document. On the frontend (JavaScript, etc.) this is no longer necessary.
You need to create a <script>
tag on the frontend (HTML) and insert the following javascript code into it to pass the hashed email on to Seznam's JS scripts for processing.
<script>
if (window.sznIVA && window.sznIVA.IS) {
window.sznIVA.IS.updateIdentities({eid: 'email value'}) // email or hashed email
} else {
window.addEventListener('szn:identities:ready', function() {
window.sznIVA.IS.updateIdentities({eid: 'email value'}) // email or hashed email
})
}
</script>
Diagram
The diagram shows the process of getting the hashed email on your backend and passing it to the JS scripts from Seznam.