Voyado Engage uses a unique Contact ID identifier to recognize returning users and personalize their onsite experience. This identifier is stored in the browser’s localStorage under the key voyado-cid.
This article explains the mechanisms through which the contact ID is obtained and stored, how it is updated, and best practices for security and privacy compliance.
Purpose of the voyado-cid
-
voyado-cidis a client-side identifier used by Voyado’s onsite messaging feature. - It holds the Contact ID of a user, which is a GUID that uniquely identifies a contact in the Voyado Engage database.
- Format example:
c4ff6bb3-cebd-4cd7-902f-b29900b1ef7d - By storing this ID in localStorage, the system can identify visitors across sessions and page views.
How the contact ID Is Set
The voyado-cid value is written to localStorage under one of the following conditions:
1-Soft Identification via Encrypted Link
- Users land on the site from a newsletter with a soft ID (an encrypted eclub ID) in the URL.
- The script decrypts this using a Soft ID identification key.
- If a valid Contact ID is retrieved, it is saved in
voyado-cid.
2-Script Call with Personal Identifiers
If the site implementation calls a Voyado script with identifiable fields like email, phone number, or personal number:
- The script uses this information to query the Contact API.
- If the contact exists, the returned Contact ID is stored in
voyado-cid.
This scenario depends on proper developer-side configuration. Refer to Voyado's Developer Documentation for implementation instructions.
3-Onsite Message Form Submission
A user submits identifiable data through an on-site message widget (e.g., a pop-up form).
The data is used to:
- Fetch an existing contact, or
- Create a new contact via the Contact API.
In both cases, the resulting Contact ID is stored in voyado-cid.
Updating the stored contact ID
If a user action returns a different Contact ID than the one already stored (e.g., shared computer scenario):
- The stored
voyado-cidvalue is overwritten.
This ensures personalization reflects the active user.
Using voyado-cid for API calls
Once a valid voyado-cid is available, The script uses the Contact ID to perform lookups to:
- Contact API
- Promotion API
- Audience API
These responses are cached temporarily during the session to reduce API calls and improve performance.
This mechanism is key to applying targeting criteria and personalized content.
Privacy and security considerations
The contact ID is personal data under GDPR and similar regulations.
Do not store additional personal data (e.g., email, phone) in localStorage.
Consent Requirements:
- Ensure explicit consent is obtained before storing data, where legally required.
Security Reminder:
-
localStorageis accessible by any script on the page and is vulnerable to XSS. - Never store authentication tokens or sensitive data.
Clearing the contact ID
To forget or reset the user identity:
localStorage.removeItem('voyado-cid');Use this on:
- Privacy opt-out
- “Forget me” requests
Example DevTools check
| Action | Expected Result |
|---|---|
| User identifies |
voyado-cid key appears in localStorage
|
| Clear site data, reload |
Script re-identifies and resets voyado-cid (if
possible)
|
| New user submits email via widget |
voyado-cid updated to new Contact ID
|
Article last reviewed
Comments
0 comments
Please sign in to leave a comment.