logo

Seznam pro vývojáře

Identita

Seznam pro vývojářeIdentitaHashovaný email (eid)

Tato stránka česky

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

  1. Remove the whitespace from the user's email (before and after)
  2. Convert it to lower case
  3. Convert it to a UTF-8 encoded string
  4. Encrypt it with the SHA-256 algorithm
  5. 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.

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.

WEB.CZ Backend (PHP, Python, ASP, ...) Your login process, get the user email user@mail.cz You hash this email and forward it to your frontend 05d220df57f095be44ce1b2f3143399717fadf6467a7179403514d650dd141e0 Frontend (HTML, React, Angular, ...) This is where you load one of the scripts: ssp,js, rc.js and call from our API: if (window?.sznIVA?.IS) { window.sznIVA.IS.updateIdentities({eid: 'email value'}) } else { window.addEventListener('szn:identities:ready', function() { window.sznIVA.IS.updateIdentities({eid: 'email value'}) }) } Subsequently, the request goes to Seznam, whether the rtg/conv, ssp ... and it automatically contains the forwarded eid SEZNAM.CZ endpoint