SetEncryptedEmail: Difference between revisions

From Barion Documentation
Jump to navigation Jump to search
(created page)
 
(fixed title syntax)
 
Line 1: Line 1:
= setEncryptedEmail =
__NOTOC__
{{PageTitle|title= setEncryptedEmail}}
 
{| style="margin-left:2em;" align="right"
| __TOC__
|}


<blockquote>Required event. Handling this event on your Barion shop's screens is required as part of a Barion Full Pixel implementation.</blockquote>
<blockquote>Required event. Handling this event on your Barion shop's screens is required as part of a Barion Full Pixel implementation.</blockquote>

Latest revision as of 10:06, 23 May 2024

setEncryptedEmail

Required event. Handling this event on your Barion shop's screens is required as part of a Barion Full Pixel implementation.

Short description

The event encrypts an email address using SHA-1 that the user entered, to be used as a GDPR-compliant tracker to replace third-party cookies.

Passing the event an empty string, an invalid email address, or an improperly hashed email address throws an error message.

Trigger

The user clicks on or views a page on a site where an email address has been entered.

Properties

Not applicable

Sample implementation

The event accepts lowercase plaintext email addresses only.

bp('identity','setEncryptedEmail', '[email protected]');

The event also accepts a previously SHA-1-encrypted email addresses.

var hashedEmailAddress = sha1('[email protected]');
bp('identity','setEncryptedEmail', hashedEmailAddress);