Customer UUIDs

The actions described in this article are usually only performed when procedures from other articles require them.

Generating UUIDv5

UUIDv5 is generated by providing a namespace and an identifier string. When working with Synerise, the identifier string is a concatenation of a salt string (identical for all of your customers, everywhere on the site) and an identifier. The resulting UUID is always the same for a given salt+identifier combination.
Thanks to this, you can always assign the same UUID to a customer, regardless of where the UUID was generated.

  • The salt can be any string.
  • By default, the customer’s unique identifier is email. You can configure Synerise to use custom ID instead.

The following example shows how to generate a UUIDv5 in Python 3.8:

import uuid

salt = "someString" # identical for the entire site
uniqueIdentifier = "" # email (default) or customId
generatedUuid = uuid.uuid5(uuid.NAMESPACE_URL, (salt + uniqueIdentifier))

The result of running the above code example is always 345d4c8f-5aff-591d-a19c-1ca48923d9ee.

Synerise does not the decode the UUID and cannot re-construct the data the token was created from.

For more instructions on how to generate a UUIDv5, refer to the documentation of the language or framework you are using.

Resetting customer UUIDs

You can reset the UUID of a customer to a value provided by your application. This can be used, for example, to separate the activities of several customers who share a device.

You can do this in two ways: by setting a cookie (requires a page refresh) or by calling an SDK method (SDK must already be initialized).

Note: The UUID should not be completely random. However, a fully random UUIDv4 is also allowed, depending on your integration and requirements.

Before initializing the SDK, store the new UUID in a _snrs_reset_uuid cookie.

When the page is refreshed/SDK is initialized, the SDK detects the cookie, sets the customer’s UUID, and automatically deletes the cookie.

With SDK method

Use the SR.client.setUuid("new_uuid") method:


How to recognize a UUIDv5?

The first digit of the third group in a UUIDv5 is 5. In a UUIDv4, that digit is 4.

xxxxxxxx-xxxx-5xxx-xxxx-xxxxxxxxxxxx // UUIDv5
xxxxxxxx-xxxx-4xxx-xxxx-xxxxxxxxxxxx // UUIDv4


We are sorry to hear that

Thank you for helping improve out documentation. If you need help or have any questions, please consider contacting support.



Thank you for helping improve out documentation. If you need help or have any questions, please consider contacting support.

Close modal icon Placeholder alt for modal to satisfy link checker