Skip to main content

Voyado Engage

Match content with cookie

Cookie “_vaI” holds the Voyado contact id of the identified user.


This method will set cookie “_vaI”. Invoke this method only when the user has been identified by the website, e.g. sign in. Be cautious, user might already be identified (e.g. by email link click), invoking this method incorrectly might clear existing identification. setContactId() will not generate a http request to the Collect endpoint.






Voyado contact id

va("setContactId", "contactId");

Identification through email click (automatically)

Step by step:

  1. Customer (user) receives a marketing email sent from Voyado

  2. Customer clicks on link that leads to e-com. The link contains the “vtid” parameter (a short version of the contactId (short GUID))

  3. The tracking script will automatically store the “vtid” in the “_vaI” cookie

Identification on site

Identification should ideally be done whenever possible. You should start out by mapping your current contact integration towards Voyado and add the “setContactId” method every time you identify, update or create a contact. The contactId will always be included in Voyados answer.

Common examples:

  • customer registers as newsletter subscriber

  • customer registers for lojalty program

  • customer logs in

  • customer completes purchase

More information and best practices about cookies and identification

From the time a user is identified, all upcoming tracking events from the same browser are linked to the identified contact. This applies until the _vaI cookie disappears or changes (eg when another user logs in to the site from the same browser). We recommend that the e-com site always send with contactId in all tracking events such as cart () and productview () when the user is identified to.

Regardless of whether the user is identified or not, all tracking events are always linked to a client ID stored in the _va cookie. A browser retains the same client ID until the cookie disappears. By mapping client ID to contact ID, Voyado can link historical tracking events to a contact ID after identification. Since anonymous tracking events can be linked to a contact ID afterwards, the e-com site should not limit tracking events to identified or only logged in users.

List of relevant cookies




Life span*


Client-id. Generated by the script and links all events to a client.


2 years


Session-id. Can be used to link events to one and the same session.


30 minutes


Contact-id (guid/shortguid). Exists if the user is identified and links events to a contact in Voyado.


2 years

*In Safari, the lifespan of all cookies created with javascript is a maximum of 7 days.

Important steps to ensure during implementation

Call “setContactId ()” only when the user is identified by the site.

As soon as the site knows who the user is (for example when logging in), “setContactId ()” must be called with the user’s contactId. The function should never be called with zero, empty (no value) or other invalid value, as this could potentially reset an existing identification.