Use this page when you want to understand exactly when the SDK creates theDocumentation Index
Fetch the complete documentation index at: https://docs.cevoid.com/llms.txt
Use this file to discover all available pages before exploring further.
cevoid_sid cookie and when it does not.
Short answer
The SDK only attempts to create acevoid_sid cookie when both of these are true:
- You enabled
enableSessionTracking - The consent checks resolve to granted
Consent decision flow
WhenenableSessionTracking: true, the SDK runs a consent check during init().
The final decision is:
- Grant consent only if all available consent checks pass
- Deny consent if one of the checks explicitly fails
- Fall back to granted only if the consent check throws unexpectedly
Consent sources
The SDK checks up to three sources:Shopify Customer Privacy API
Ifwindow.Shopify.loadFeatures is not present, this check defaults to granted.
If Shopify is present, the SDK tries to load the consent-tracking-api feature and waits up to 5 seconds:
- If the feature loads successfully, the SDK checks
window.Shopify.customerPrivacy.userCanBeTracked() - If feature loading fails or times out, this Shopify check resolves to denied
GTM dataLayer
If window.dataLayer is missing or is not an array, this check defaults to granted.
If a consent entry is present, the SDK looks for the first array entry whose first item is consent, then reads analytics_storage from the third item:
analytics_storage === 'granted'means granted- Any other value means denied
window.cevoidTrackingConsent
If window.cevoidTrackingConsent is missing, this check defaults to granted.
If it is present:
'granted'means granted- Any other value means denied
When the cookie is set
If consent resolves to granted, the SDK immediately calls its session initializer duringinit().
That initializer:
- Reuses the existing
cevoid_sidcookie if one already exists - Refreshes the cookie to a new 30-minute rolling expiry
- Creates a new session ID if no session exists yet
- Name:
cevoid_sid - Lifetime: 30 minutes, rolling
- Path:
/ - SameSite:
Lax - Domain: set only when you pass
cookieDomain
ca_session cookie exists, the SDK deletes it during initialization before continuing.
When the cookie is not set
The SDK does not create a cookie in these cases:enableSessionTrackingis not enabled- Consent resolves to denied
- The browser blocks cookie writes
session_id is omitted.
In the third case, the SDK falls back to an in-memory session ID for the current page runtime.
The in-memory fallback is not persisted across full page reloads, so it behaves like a temporary session for the current runtime only.
What happens to events while consent is resolving
When session tracking is enabled, the SDK defers tracked events until consent is resolved. After consent resolves:- If granted, the SDK creates or refreshes the session and then processes deferred events
- If denied, the SDK processes deferred events without a
session_id
Practical examples
Non-Shopify site with no custom consent signals
Result:- Shopify check defaults to granted
- GTM check defaults to granted
- Cevoid check defaults to granted
- Cookie is created if session tracking is enabled
Shopify site with consent API available and tracking allowed
Result:- Shopify check grants consent
- Other checks must also grant or default to granted
- Cookie is created
Shopify site where the consent API fails to load
Result:- Shopify check denies consent
- Cookie is not created
- Events can still be sent without a
session_id
Site with GTM consent set to denied
Result:- GTM check denies consent
- Cookie is not created
Site with window.cevoidTrackingConsent = 'denied'
Result:
- Cevoid consent check denies consent
- Cookie is not created