# anonymize

Learn how to dissociate the current session from a user.

This method anonymizes the visitor, dissociating the session from any previously identified user.

You usually call it when the user logs out. For more information, see [Data collection](/reference/sdk/php/data-collection).

## Signature

This method has the following signature:

```php
public function anonymize(): void
```

## Example

Here is a basic example of how to use this method:

```php
<?php
use Croct\Plug\Croct;

$croct = Croct::fromDotenv();
$croct->anonymize();
```
