Identify visitors

Identifying visitors from EU requires their consent. More info here.

Display in Smartlook Dashboard information such as: e-mail and name.

Code that you need to insert has a following format:

<script> smartlook('identify', uid); </script>

uid is unique number used to identify user = user ID. Let's say in your user database is following record:

uid name mail
12345 Prokop Buben

Now let's have a look at example in PHP:

echo "<script>"; echo "smartlook('identify', '{$user->id}');"; echo "</script>";

In your website the following code will be generated:

<script> smartlook('identify', 12345); </script>

Detailed identification

You can get more information using another parameter which can contain all information you want to assign to any given recording. Except email and name, it can be information about what package user as prepaid or total sum paid. There is no limit on what information you assign to recording so use the code below as an example only:

<script> smartlook('identify', uid, { "name": "Prokop Buben", "email": "", "sex": "male", "package": "Premium", "totalSpent": 1234.5 }); </script>