Cookieless tracking refers to methods of collecting user data without relying on traditional browser cookies. This approach is gaining traction due to privacy regulations and increasing user privacy concerns.
The smartocto Insights script sets two cookies by default to manage user identification and session tracking on websites. This documentation outlines the default behavior of smartocto Insights script and provides guidance on customizing cookie settings.
In this article you read about:
- the setting to force the smartocto Insights script to not set cookies
- how to set the partyId
and sessionId
The setting to not set cookies by the Insights script
If there is a need to disable cookie setting by the smartocto Insights script, modify the noCookies
property within the _ain
(more about Insights code snippet )object in the browser window object. By setting noCookies
to true _ain.noCookies = true;
, the script will refrain from setting cookies. However, note that backend systems rely on the presence of partyId
and sessionId
, which should be managed on your end within the _ain
object.
// Disable cookies by setting noCookies to true
_ain.noCookies = true;
// DefinepartyId
andsessionId
on_ain object
_ain.sessionId = 1747390175398.168151494.3546215;
_ain.partyId = '1747141975662.148550473.94038546';
sessionId
and partyId
values, should be specified in the following format:{timestamp}.{digits}.{digits}
partyId
paramater represents unique user identifier:{timestamp} should be defined as 13-digit Unix timestamp, that should represent moment when user id was created.
sessionId
paramater represents unique user session identifier, that should be refreshed on a 30 minute interval:{timestamp} should be defined as 13-digit Unix timestamp, that should represent moment when user session id was created.
Important note
Even without cookies, tracking can still fall under GDPR if it processes personal data. Always assess whether your method identifies users (directly or indirectly) and ensure proper legal grounds.