SetEncryptedPhone: Difference between revisions

From Barion Documentation
Jump to navigation Jump to search
(created page)
 
No edit summary
 
Line 1: Line 1:
= setEncryptedPhone =
__NOTOC__
{{PageTitle|title= setEncryptedPhone}}
 
{| 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

setEncryptedPhone

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 a phone number 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 phone number, or an improperly hashed phone number throws an error message.

Phone numbers must start with a "+", followed by 4 to 15 numbers.

Trigger

The user clicks on or views a page on a site where a phone number has been entered.

Properties

Not applicable

Sample implementation

Pass the event phone numbers without any formatting, as the user typed them.

bp('identity','setEncryptedPhone', '+36301234567');

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

var hashedPhone = sha1('+36301234567');
bp('identity','setEncryptedPhone', hashedPhone);