# `plandalf.getAnonId()`

Read the anonymous visitor ID.

Implemented by the [browser object](https://github.com/plandalf/numi/blob/fc6f42b5ade3d63b71623934838a6509f17203e2/packages/sdk/src/browser.ts#L431); parameter and return types follow the [delegated class declaration](https://github.com/plandalf/numi/blob/fc6f42b5ade3d63b71623934838a6509f17203e2/packages/sdk/src/core/sdk.ts#L330).

Call this after `plandalf.ready()`. The browser wrapper can return `undefined` before initialization.

## Signature

```typescript
plandalf.getAnonId(): string
```

## Arguments

| Name | Type | Meaning |
| --- | --- | --- |
| None | — | This method takes no arguments. |

## Example

```javascript title="getAnonId.js" lineNumbers lineNumberStart=1
plandalf.ready(() => {
  const anonId = plandalf.getAnonId()
  console.log(anonId)
})
```

## Returns

`string`

## Behaviour

Returns the anonymous visitor ID after initialization.

[All plandalf methods](https://plandalf.com/docs/sdk)

Source: https://plandalf.com/docs/sdk/getAnonId
