Skip to main content

Visitor identification

How do we manage visitor identification

What is visitor identification

Visitor identification is the basis of all calculations in Analytics.

Without a perfect management of this identifier, and a real persistence, we would not be able to calculate an exact number of visits and visitors.

This visitor identifier, present on all the events we collect, is personal data. More information is available in our Privacy Center.

How it works

The visitor identification is created the first time you use a pa.sendEvent() / pa.sendEvents() method.

The information is first stored in a cookie, and then sent to all future events into a query parameter.

CookieQuerystring parameterFormatSDK version
pa_vididclientGUID< 6.7.0
_pcididclient16 char.>= 6.7.0

The visitor ID must be 16 or 36 characters long.

caution

As the visitor identification is a key notion in Analytics (visits, visitors, ...), we recommend that you do not change our SDKs behavior regarding its management.

Legacy visitor management

More information about legacy visitor management in our Cookies & storage article.

Visitor identification configuration

You can configure the visitor identifier to suit your needs.

Visitor identification behavior you can modify:

NameDescriptionTypeValue
storageLifetimeVisitorLifetime Storage Visitor valueint395 (days)
visitorStorageModeRelative or fixed cookie lifetime value for visitorstringfixed (default), relative
isVisitorClientSideIs cookie deposit client side ? If false, server sidebooleantrue (default), false

To setup the configuration, please consult our Javascript SDK article.

Visitor identification management

In some specific cases, it can be useful to manage the visitor identifier yourself.

We provide you with dedicated methods for that matter.

Method:

pa.setVisitorId(visitorId)

ParameterTypeDescriptionFormat
visitorIdstringVisitor identifierGUID or 16 char. long
pa.setVisitorId('97c7db4e-4514-4b8e-b693-bd6b57043cc1');

You can also retrieve the visitor ID with a dedicated method. This can be useful to synchronize an ID between native and webviews.

Method:

pa.getVisitorId()

const PAVisitorId = pa.getVisitorId();