Caveats & known limits

Caveats & known limits

A candid list of how Tocadule's data model actually behaves at the edges — the things worth knowing before you rely on a behaviour, and the practical implication of each. This page doubles as the reference an AI agent should read before generating tracking code or answering "why is X happening".

Everything below is grounded in the live ingestion path (/events/track, /events/identify) and the snippet loader — not aspirational behaviour.

The install is a stub + async loader

The snippet loads asynchronously. A tiny stub queues any calls made before snippet.js finishes downloading into tocadule._q, and the snippet drains that queue on init. This is why you never wrap calls in if(window.tocadule) on a per-page basis — paste the stub once site-wide and call the API bare.

<link rel="preconnect" href="https://app.tocadule.com">
<script>window.tocadule=window.tocadule||{};window.tocadule._q=window.tocadule._q||[];['track','identify','cart','requestPush','setConsent'].forEach(function(m){window.tocadule[m]=window.tocadule[m]||function(){window.tocadule._q.push([m,arguments])}});</script>
<script async fetchpriority="high" data-workspace="YOUR_WORKSPACE_ID" src="https://app.tocadule.com/snippet.js"></script>

The public API surface is exactly five calls: track(name, props), cart(data), identify(email, traits), requestPush(cb) and setConsent({ analytics, ads }).

⚠️

The event and cart scripts shown in the Data centre carry no if (window.tocadule) guard: they rely on the stub above in your theme header, which defines window.tocadule immediately, so every call is queued. Without the stub, an early inline call fails.

Event rows never hold personal data

The ingest seam strips email, phone, first / last / full name, address fields, national id, birth date, user_data and the personal fields inside traits from every event before it is stored, whatever the door (browser, Shopify, Server API, popups) and whatever the event (identity events included). An email-shaped value in a page address or a search term becomes redacted. The S3 archive gets the same strip.

Customer details still do their job on the way in: on identity events (identify, our popup forms, Shopify) they find or create the contact before the strip. They are then kept only on the contact.

Implication: don't look for an email on event rows, and don't put one on browsing events. Destinations read hashed email / phone from the contact, or from that one event's own customer fields (never stored).

Linking needs an identity event, and the analytics lane

A browser is linked to a contact (an identity_map row) only when:

  1. an identity event names the contact: identify() (sign-up, login, or once on logged-in pages, or right before a purchase) or one of our popup forms; and
  2. the analytics lane is granted (no answer is not consent). With only the advertising lane granted, the link is an ads link: ad sends only, never a report.

Once linked, every event of that browser, including the earlier ones, resolves to the contact: reports, segments and attribution read the person through identity_map.

Implication: a merchant needs at least one identity call per visitor. A logged-in shopper's browsing joins them through the one identify() line in the common template; every buyer's through the identify() on the order page. A visitor who refused analytics is never linked for reports: identify still writes the contact, their browsing stays under the day's hash, and the order counts once. If they allowed advertising, their browser is linked for ad sends only (an ads link).

No contact is ever subscribed without evidence. identify() without a permission trait, a Shopify order, an import or a contact added by hand start not subscribed; only a permission field (subscribed_<channel>), a popup form, Shopify's marketing consent or your explicit choice sets it. Every change goes to the contact's permission log.

cart() is PII-free by design

tocadule.cart() carries the cart contents only — items, total, currency, item count. It resolves to a contact through the anonymous_id → identity map join, so it never needs (and should never carry) an email.

<script>
  // cart: call on every cart change (add, remove, quantity) and on the cart page, with the WHOLE cart. Replace each {…} with your platform's token.
  var items = [];
  // inside your platform's cart loop, once per product:
  items.push({ product_id: `{productId}`, variant_id: `{variantId}`, sku: `{sku}`, name: `{productName}`,
    price: `{productPrice}`, quantity: `{productQuantity}`, url: `{productUrl}`, image_url: `{productImage}` });
  tocadule.cart({ items: items, subtotal: `{subtotal}`, currency: `{currency}`, cart_id: `{cartId}` });
</script>

An empty cart is items: []. No email or other personal data goes on the cart.

Your platform's cart (for example Shopify's carts webhooks) carries cart contents only too — it never scrapes customer identity.

Implication: the cart resolves to a person only once an identity event links that anonymous_id to a contact. A cart built under a cookieless visitor stays anonymous. Don't try to "fix" this by putting an email on the cart call — it is stripped; identify the shopper instead.

Dedup keys are automatic — you never set them

Deduplication uses two keys, both assigned by the system:

  • anonymous_id — browser identity, minted and stored by the snippet (consent-gated). Used to resolve a visitor to a contact.
  • source_event_id — external-system dedup key, set by server-side ingestion (Shopify webhooks: shopify-order-{id}, etc.) and by the internal identify per-day key.

Implication: merchants never pass a dedup id in track(). There is no "idempotency key" parameter you should be setting. Repeat browser events from the same visitor are expected and kept — we deliberately do not collapse legitimately-repeated events (e.g. viewing the same product twice) into one.

Consent is two lanes — nothing else

Tocadule reads exactly two CMP consent lanes, detected automatically from the merchant's consent platform (Google Consent Mode, IAB TCF v2, OneTrust, Cookiebot, Iubenda, GPC, or an explicit override):

LaneFieldGates
Analytics / generalconsent_stateKeeping an anonymous_id; linking the browser to a contact
Advertisingad_consentForwarding to ad destinations (Meta / Google / TikTok)

The analytics lane keeps an identifier and allows linking only on granted. denied, unknown or absent means cookieless: no anonymous_id, no linking, no raw IP / user agent, and the country as the only location. Nothing overrides a refusal — identify() is sent under the lanes as they read at that moment.

The advertising lane resolves independently to full (granted) or nothing — a count where the destination counts the not-consented — (denied or no answer) and governs only what leaves for ad platforms — analytics consent never turns ads on, and identify() never grants ad consent.

⚠️

Marketing permission (subscribed_email / subscribed_sms / …) is a separate record on the contact, not a CMP lane. It is set through identify() traits, our popup forms, Shopify or the panel — never by a tracked event, never inferred from a consent banner. Don't conflate "the visitor accepted analytics cookies" with "the visitor subscribed to email".

Implication: if a visitor's CMP reports analytics denied, that visitor stays cookieless for our analytics (no anonymous_id on its events, counted only via the daily IP+UA visitor_session_hash) and is never linked to a contact for reports (with ads granted, only an ads link for ad sends). If ad consent is denied but analytics is fine, you still get analytics — you just don't forward personal data to Meta/TikTok/Google.

Location comes from MaxMind only, on every domain

When a merchant serves the snippet from their own first-party domain (data.<merchant>.com via CloudFront SaaS Manager), CloudFront only populates the basic viewer headers. So CloudFront's viewer headers are not read at all: MaxMind (GeoLite2 City, in our database) is the one source of location — country, region, city, postal code and time zone are resolved from the real client IP on every event (no postal code or time zone for a visitor who did not consent).

Implication: location on events is populated regardless of distribution, so By-Geo segments and Top-Countries work for first-party-domain merchants. Location segments are event-based — they read properties.country off events, not off the contact profile.

Contact profile location (country / city on the contact record) is declared-only — set from identify() traits (traits.country / traits.city, typically the account or shipping address), never inferred from the request IP. An IP says where a request came from (proxy / VPN / travel / prefetch), not where a person lives, so we never freeze an IP-inferred location onto a contact.

To populate profile location, send it explicitly:

<script>
  // At sign-up / login. Everything except email is optional — country + city
  // unlock location segments. Add the boxes the shopper ticked as
  // subscribed_<channel> (true when ticked) if this is a sign-up; without them nothing is subscribed.
  tocadule.identify(`{email}`, { first_name: `{firstName}`, last_name: `{lastName}`, phone: `{phone}`, country: `{country}`, city: `{city}` });
</script>

Custom / arbitrary event names pass through

track() accepts any event name. The only requirement at ingestion is a workspace_id and a non-empty event name — there is no allow-list. An unknown name is stored verbatim as an events row like any standard event.

What an unknown event does not get:

  • It is not one of the expected events in the Data centre (the fixed set: page_view, product_view, add_to_cart, cart_state, checkout_started, purchase, identify, etc.) unless its name is a known alias of one of them.
  • It is not counted in the pixel gap report (only the five commerce events product_view, add_to_cart, checkout_started, purchase, search are).
  • It is not forwarded to an ad destination unless a destination mapping exists for that exact name (mapping is exact-match — we never guess aliases at runtime).

Where an unknown event does appear: in the Event stream on the Events page, in the distinct-event-names list, and as a read-only row in the Events page's Sources tab (count, last received, which properties arrived). So a custom event is fully captured and queryable — it just isn't part of the standard funnel/forwarding contract until you map it.

Implication: custom events are safe to send and useful for your own analysis, but don't expect a brand-new event name to automatically show up in funnels, drive an ad forward, or feed a canonical segment. Segments and destinations key off the canonical events; wire a mapping (or use a canonical name) if you need those behaviours.

A cancellation needs a recorded purchase

  • A purchase_cancelled counts only if we recorded the purchase with the same order id (Toca's upload also matches the order number). An order placed before you installed Tocadule, or one whose order-success script sent a different id than your admin panel shows, is skipped (no_purchase). Send the same id in both.
  • An order is reversed at most once, whichever way the cancellation arrives. Only a partial refund and a cancellation of the same order landing at the very same moment can, rarely, both count.
  • It never comes from the browser — Shopify sends it, your server sends it through the server API, or you upload it to Toca.
  • Google Ads, Meta, TikTok and ChatGPT Ads don't receive reversals; GA4 does (details).

Quick reference

BehaviourRule
PII on event rowsNever — stripped at the seam on every door (archive too)
Customer detailsOnly on identify and popup forms (an email on another event is its ad match only, never stored); kept on the contact
Linking a browserIdentity event + analytics lane allows it; earlier events resolve too
Refused buyerBrowser door anonymous (day hash, no contact); Shopify door contact without browser key; counted once. Ads follow the ad lane: refused → anonymous; allowed → the Shopify order's hashed email goes
Email on cart()Stripped — cart is PII-free by design
Dedup id parameterNone — anonymous_id / source_event_id are automatic
Consent lanesTwo: consent_state (analytics) + ad_consent (advertising); identify() raises neither
Marketing permissionSeparate record on the contact; never subscribed without evidence
Lasting browser idkept with analytics OR ads; on a row only with analytics
Location sourceMaxMind from client IP (single source of truth)
Contact profile locationDeclared-only: identify traits, CSV, Shopify address (never a popup form)
CloudFront viewer headersNot read (MaxMind only)
Custom event namesAccepted + stored; not in canonical funnel/forwarding unless mapped
purchase_cancelledServer API, Shopify or Toca — never the browser
Reversal of an orderAt most once; needs a recorded purchase with the same id
Server API eventsKey-authenticated; no browser enrichment, no cart gap-fill, no attribution