Analytics and telemetry (PostHog, TikTok pixel)

Atualizado em Nov 16, 2026 Abrir ferramenta

Zoovdev measures how the site and the workspace are used with PostHog (project 336183, US cloud), through a first-party proxy at /z/ph so ad blockers see the site's own domain. Nothing is sent until the visitor allows cookies; the answer is one key, cookie_consent, shared by the legacy site's banner and the workspace's consent card, and a decline turns capture off and forgets the person's id. The answer can be changed later: Cookie settings in the footer of every page outside the workspace (2026-10-02) brings the card back. Signed-in people are identified by their user id with their email and sign-up date; nothing else personal is attached to an event.

TikTok pixel and Events API (2026-11-05)

TikTok ads are measured on one pixel, DBLR15RC77UF910655J0 (src/lib/config/tiktok.ts), from both ends: the pixel in the browser and TikTok's Events API from the server, so Ads Manager can optimise a campaign on registrations and payments instead of clicks (the Traffic campaign of 2026-10 bought clicks from Iraq). Like the GA4 tag, the pixel is not behind the cookie card; PostHog is.

  • In the browser (src/app.html, src/lib/utils/tiktok.ts): the ttq queue is defined before anything runs and the pixel library is fetched after load and idle, like GA4, so nothing it does lands on the startup path. It sends a page view on every address (the four layouts call tiktokPage() beside the PostHog page view), ViewContent with the tool as the product on any /app/<tool> address (not the home, profile, team, referrals, api, comp, library pages), InitiateCheckout with the price in view when a plan or a pack is chosen in the plans or credits dialog, and CompleteRegistration on the first page after a new account. A signed-in person is identified to the pixel by their SHA-256-hashed email and user id (TikTok's advanced matching), so the server's events match the browser that saw the ad.
  • The click id: a landing with ?ttclid= keeps it in the zoov_ttclid cookie for 28 days (hooks.server.ts, tiktokCapture), HttpOnly. The pixel's own _ttp cookie is first-party and the server reads it too.
  • The click id across two browsers (2026-11-15): an ad opens in TikTok's own browser, Sign in with Discord hands over to the Discord app, and the callback lands in Safari or Chrome, which has never seen the landing page and holds no zoov_ttclid. The registration then went to TikTok with no click id, so the ad was not credited with it. The auth callback now also reads the id from next, the landing address with its query that the sign-in returns to (clickIdOf, tiktokAttributionOf(cookies, next) in src/lib/app/server/tiktok.ts); the cookie still wins when it is there. In the campaign's first ten days PostHog saw 49 people land in TikTok's browser and none of them sign in there, while 36 of the 55 sign-ups it could see were already signed in on their first page view in a system browser: the same people, in a second browser, counted twice by PostHog and not at all by TikTok.
  • From the server (src/lib/app/server/tiktok.ts, TIKTOK_ACCESS_TOKEN from the environment; without it nothing is sent, so dev and tests send nothing): the auth callback sends CompleteRegistration for a brand-new account (finalizeSignIn's isNewSignup) with the click id, the browser id, the hashed email and id, and leaves the account id in the zoov_ttreg cookie for ten minutes so the next page's pixel sends its copy under the same event_id (reg_<user id>; TikTok keeps the first of a pair with one id and drops the other within 48 hours). The checkout routes (billing.ts: a pack or plan session, a saved-card charge) put the two ids on the Stripe object's metadata as tt_ttclid and tt_ttp; the Stripe webhook's recordPayment sends Purchase (TikTok's current name for a payment; the older CompletePayment is the same event) the first time a succeeded payment is recorded, named pay_<payment intent or session id> so a retried webhook cannot count twice, with the value in dollars, the currency, the pack or plan as the content, the hashed email from the profile and the ids from the metadata. A subscription's first invoice (billing_reason = subscription_create) adds Subscribe. Payments are server-only: the browser never knows the payment intent the event is named after, so a browser copy could not be matched and would count twice. invoice.paid now finds the account through stripe_subscriptions (or the invoice's subscription metadata), so a renewal's row carries the user id it used to lack.
  • Testing: TIKTOK_TEST_EVENT_CODE (from Events Manager › Test events) marks every server event as a test. The Events API answers code: 0 when it took the batch; a refusal is logged as [tiktok] ... refused. The browser side can be watched in Events Manager or with the TikTok Pixel Helper extension.
  • Campaign use: optimise on Complete Registration first (payments are too few to leave learning), TikTok-only placement (no Pangle), tier-1 countries, landing on tool pages with ?utm_source=tiktok&utm_content=<ad>. Judge an ad group on day-14 sign-up→pay in PostHog, not on Ads Manager's CTR.

What the workspace reports (since 2026-09-19)

Before 2026-09-19 the workspace (/app) sent no page views and no product events of its own; only the plans and credits dialogs reported (the pricing_* and payment_* events shared with the site). It now reports through one module, src/lib/workspace/services/analytics.ts, and every event carries surface: workspace plus, as PostHog super properties that ride along until they change, the game (fivem, roblox), the mode (the tool on the stage), the tier (the plan), signed_in, and since 2026-10-09 display (app in the installed app's own window, browser in a tab).

Page views: the workspace is one page whose address is the tool, so every address change is a $pageview, and the first one of a visit also sends workspace_opened with the path and the referrer.

Product events, in the order a visit tends to go:

  • workspace_mode_opened (mode, game, section, has_project): a tool came onto the stage, whether by the rail, the address, a drop or a project. workspace_game_switched (from, to).
  • workspace_rail_edited (2026-10-05; how, tool, pinned): the person changed which tools sit on the left rail. how is star (the Tools menu star), menu (right-click Unpin), cross (the cross on a tile while editing), drag, keys (the editor grip's arrows), editor (pin or unpin in the editor), most_used or reset; tool names the tool when one moved; pinned is how many tools the rail shows after. Read with workspace_mode_opened by section to see whether pinning changes what people open.
  • workspace_app_install_asked (2026-10-09; source, way): Install app pressed in the profile menu; way is prompt (Chrome or Edge, which then ask their own question), dock (Safari on a Mac, told File › Add to Dock) or home-screen (iPhone, iPad). workspace_app_install_answered (outcome accepted | dismissed): the browser's question answered. workspace_app_installed: the browser's appinstalled, from our row or its own install icon alike. The site bar and the front page's closing block ask too (source site-nav:<surface>, closing), alongside their own cta: install_app click. /install sends install_page_viewed (platform, installed) and install_page_clicked (platform, way), and asks with source: install-page. See shell/install.svelte.ts and the workspace doc.
  • Paying in the Credits dialog and the plans dialog (2026-10-10; plans and boosts the same day): payment_subscription_checkout_started and pricing_plan_selected carry checkout_mode (elements | redirect) and checkout_destination (payment_step | stripe_checkout), the server's payment_subscription_checkout_created says checkout_mode, and payment_elements_completed fires with plan_id and billing_cycle for a plan paid in the step. payment_pack_checkout_started carries checkout_mode (elements for the payment step, redirect for Stripe's page) and payment_elements_completed (package_id, credit_amount, total) fires on a payment made in the step, with source (credits or plans) since the plans dialog took the step too.
  • workspace_file_received (format, size_kb, forced, mode; via picker or folder when it came through a tool's own Choose file button, which the page's drop router never sees): a file was dropped, picked or pasted. Then one of workspace_file_opened (the tool that took it, switched when it was another tool), workspace_file_to_library (no tool takes it, the library keeps it), workspace_file_rejected, or workspace_file_chooser_shown (more than one tool could take it). workspace_sample_used (mode, format) when a tool's sample is tried, from the conversion stage (its empty state or, since 2026-09-29, the Steps card's Try a sample). workspace_designer_link (mode clothing or prop, since 2026-09-30): Edit YDD/YDR textures under a Create tool's empty stage was pressed, someone who came to that tool for a texture. workspace_next_step_clicked (since 2026-10-06; from uv, prop or clothing, to design, unit textures, cost, balance, covered): the AI card after a free tool's export was pressed (the UV map written, a prop or garment converted), on its way to the Designer. workspace_reference_added (mode prop or clothing, count, format ydr or ydd, since 2026-09-30): the person's own reference file was added in the panel's Reference field (a YDR beside a prop in place of the person, YDD files in place of a clothing slot's base piece).
  • workspace_asset_opened (format, kind, source, forced), workspace_asset_downloaded (format, kind, source, bundle, all), workspace_library_uploaded (count, formats).
  • workspace_leave_answered (left, from, to): the "leave the tool" question, and which way it went. Since 2026-10-15 the question is asked only when leaving loses or stops something (workspace.md, "The one door out"), so the event is rarer and no longer a count of tool switches. Since 2026-11-15 it is not asked either for work a tool's store keeps across tools (WorkInHand.stays: the Converter's list and the files it made) on a move inside the workspace, only on the way out of it, so the Converter's share of this event drops on that date.
  • feedback_sent (2026-11-16, server side, on the person's id): the Feedback button or Home's question answered (kind note | job | skip | making, topic, rating 1 or -1, reasons, mode, has_words, plan). What was written is never sent to PostHog; it is in ws_feedback (help-center-and-feedback.md).
  • webhook_created (2026-10-02): a webhook made on /app/api (Max). Made with a key over the API it is not an event.
  • Sync pack (2026-10-03, from the Sync dialog): pack_sync_target_added (kind github or discord, mode, clean, auto), pack_sync_started (kind, release), pack_sync_folder_changed (clean), pack_build_requested (release, again when it had failed). Syncs after each build start on the server and are not events.
  • workspace_plans_opened (source, section, highlight, promo, and since 2026-10-06 need, the cost in credits of the run a wall refused, absent from other doors) and workspace_credits_opened (source, balance): the two money dialogs opening; what happens inside them is the existing pricing_* and payment_* events, plus since 2026-09-27 the promotion code box: pricing_promo_applied (promo_code, percent_off, amount_off, duration), pricing_promo_rejected (promo_code) and pricing_promo_removed; every pricing_* and payment_*_started event from the dialog carries promo_code (null without one), and the server's payment_checkout_created / payment_subscription_checkout_created carry promo_code_applied. A ?promo= link opens the dialog with source = promo-link. Since 2026-10-06: pricing_promo_rejected carries quiet (true when the code was handed in by a link or a cancelled checkout and the dialog drew nothing for the refusal); a checkout left unpaid comes back as source = stripe-cancel with promo = BACK15 on the open; the livery result dialog's Get credits is source = erlc-result (section = packs); the recovery DM's buttons arrive as ?plans=…&promo=BACK15&from=recovery-dm, so source = discover:recovery-dm; and workspace_billing_pill_clicked (status: past_due or unpaid) is the red Payment failed pill in the top bar on its way to the portal. The pricing_yearly_confirm_* events are gone with the second press. source names the door: the walls (convert-quota, converter-quota, optimize-quota, uv-limit, the generate-* and tool credit doors), and since 2026-09-20 the prompts that come before a wall (topbar-upgrade, convert-quota-low, converter-quota-low, optimize-quota-low, expiry-toast, expiry-menu, pin-limit, storage-meter, credits-plan-row, search). Since 2026-09-23 the Designer's Free limits: designer-time and designer-dialog-time (the lock over the canvas, in the tool and in the Designer dialog), designer-time-low and designer-dialog-time-low (the "min left today" chip), designer-export-size (the line under Save), designer-export-dialog (the DDS / YTD dialog), designer-textures (a YTD or DDS refused), designer-preview (the 3D preview lock), designer-designs (a design not saved), erlc-export-size (the locked 2048 in Liveries). Since 2026-09-29: erlc-references and outfit-references (the locked Up to 4 reference tile in Liveries and Clothing, and the See plans on the toast when a picked set is past the plan's references), both with highlight = standard. Since 2026-09-27: veil (See plans on the sign-in card a visitor sees over every tool), vehicle-limit (Free's vehicle for the day written), converter-mod-limit (Free's mod for the day built); and the credit walls (image-tool, tattoo-tool, generate-image, refine, generate-model, generate-livery, generate-clothing, packs-generate, preview-imagine, the cost table's button) open with highlight = pro and section = plans instead of landing on the packs. The day's counts themselves are rows in ws_allowance_uses, not events.
  • workspace_search_opened (source: button or shortcut) and workspace_search_picked (kind: Tools, Convert, Go to or Files; id of the row, file for any file; typed: how many characters). What was typed is never sent. workspace_pack_rendered (models, pictures, failed, size, shape, duration_ms) when a pack render in Preview ends, stopped or not. (The (app) layout, one of this doc's sources, changed on 2026-09-20 to re-run its loads after a paid subscription checkout; no event was added or changed by that.)
  • Code tool: code_prompt_sent (model, chars, turn, files, has_ui), code_reply_finished (model, files_changed, files, made_ui), code_reply_failed (model, message, and since 2026-10-15 wall: PROMPT_TOO_LARGE, LOW_CREDITS, NO_CREDITS or null, so the plan's walls count apart from real failures), code_rewound (messages_removed, turns, restored, deleted), code_delete_answered (deleted), code_reply_resumed (kind: retry when nothing came back, continue when part of a reply did). Shell health: workspace_body_unlocked (path) each time the page was found locked by a layer that had already closed and was let go (see workspace.md); workspace_language_changed (from, to).

Server-side events, on the person's id, so the funnel joins the browser's events:

  • workspace_job_created (action, mode, tier, input_format, input_source, counted, queue_active, queue_used_today) when a conversion is queued; workspace_job_completed (outputs, output_bytes, duration_ms, queued_ms, provider) and workspace_job_failed / workspace_job_cancelled (code, retryable, duration_ms) when the worker finishes it.
  • auth_signin_started (provider, flow, retry, next, surface; anonymous) on every sign-in door, auth_signin_completed on the callback, on the new session's id. surface is workspace when next is under /app.
  • code_chat_completed (model, requested_model, framework, steps, prompt_tokens, completion_tokens, credits, billed, has_code_access) per Syntax reply, after billing.
  • Already there before: image_generation_completed / image_texture_generated (every image and texture), tattoo_generation_completed, payment_checkout_created, payment_subscription_checkout_created, payment_saved_method_charge, mesh_generation_queued, mesh_remesh_queued, conversion_credits_deducted / _refunded.

Errors: unhandled client errors are captured as $exception by the client hook; server exceptions by captureServerException. In dev the client hook also logs the error to the console (2026-09-24): SvelteKit otherwise shows only the error page, and a stale module export was invisible without it. A click on a sign-in link used to add a row as well: /auth/start is a server route with no client route, so the router first said Not found: /auth/start (a 404 through handleError, about a hundred rows a day, 1,250 people a fortnight) and only then handed the address to the server, which 303s to Discord. Since 2026-10-15 every sign-in link carries data-sveltekit-reload (ui/Button.svelte for any /auth/ address, the raw anchors in shell/Tasks.svelte and ui/SignInError.svelte), and the client hook drops a 404 whose address starts with /auth/ or /api/. The old way also landed a server auth_signin_started for every such click, so starts before that date overcount against completions.

  • workspace_notifications_opened (2026-10-05; unread: what the badge said) and workspace_notification_clicked (kind; id for an announcement, none for a personal one): the bell in the top bar (see the Notifications doc).

What the browser no longer sends (2026-11-15)

PostHog keeps a million events a month for this project. In the four weeks to 2026-10-28 the site passed that, and nothing was stored from 2026-10-28 18:00 to 2026-11-04 03:00 UTC: six days with no page views and no product events (errors and recordings kept arriving). Two thirds of the volume was $autocapture, 181,000 of 270,000 events in a week, and most of that came from a few long sittings: half of all sessions make 18 clicks or fewer, one in a hundred makes 670.

  • Autocapture is clicks on a link or a button (or something inside one). change and submit events, and presses on the stage, a canvas, a bare field or plain text are no longer captured (autocapture in the init, src/lib/utils/posthog.ts).
  • The first 40 autocaptured clicks of a session are kept, the rest dropped (before_send, src/lib/utils/posthog-trim.ts; the count survives a reload). The start of a visit is where a click says something the product events do not.
  • Rage clicks are untouched: posthog-js judges them before the autocapture list, and the trim never drops $rageclick.
  • $web_vitals is kept for one session in four, always the same sessions; /ops reads it as a percentile.
  • workspace_body_unlocked is sent once per page load (it was 8,600 a week).
  • workspace_file_saved is new: every file that goes to the downloads folder from any tool (saveBlob in src/lib/workspace/services/download.ts), with ext and bytes, on top of the mode every workspace event carries. Until it, no tool reported that a run had ended in the person's hands, and "finished" was read off autocaptured clicks on a button named Download in seven languages. Funnels should end on this event from 2026-11-15.

Together that is about 125,000 events a week where there were 270,000. Anything that counted autocapture clicks past the fortieth of a session, or change events, reads lower from this date.

Ad blockers and the PostHog proxy (2026-09-21)

Ad blockers were refusing most of what PostHog sends, even through the first-party proxy at /z/ph. The proxy was never enough on its own: EasyPrivacy and uBlock Origin's own list match what a request looks like, not where it goes, and all three rules that hit us carry no domain at all.

What was refused The rule List
/z/ph/static/posthog-recorder.js /posthog-recorder.js EasyPrivacy
/z/ph/static/dead-clicks-autocapture.js /dead-clicks-autocapture.js EasyPrivacy
/z/ph/e/ and /z/ph/i/v0/e/ /e/*^ip=*^compression= uBlock privacy

So session replay was dead for every visitor running a blocker, and their events never arrived either. Three changes, all on our side; PostHog itself sees exactly the addresses it always has.

  • The recorder is renamed. The proxy rewrites PostHog's own remote config, swapping "scriptConfig":{"script":"posthog-recorder"} for lazy-recorder, which is posthog-js's own default name for the same bundle and is on no list. It has to be that one and not recorder: replay starts only when both rrweb and initSessionRecording are registered, and recorder carries the first without the second.
  • The capture address is aliased. The same rewrite turns "analytics":{"endpoint":"/i/v0/e/"} into /i/v0/t/, and the proxy puts /e/ back on the way out (captureAliasToUpstream). Of the rule's three parts only the path was ours to change: posthog-js always appends ip=, and dropping compression= would send every replay snapshot uncompressed, which is the heaviest traffic the site has. Session replay is configured beside it and posts to /s/, which no list objects to, so that is left alone.
  • Dead clicks are carried, not fetched. The file name is fixed inside posthog-js, so src/lib/utils/posthog.ts imports the 13 KB bundle and refuses that one fetch (useBundledDeadClicks). Carrying it is not enough by itself: 1.359.1 asks for the file whether or not the extension is already registered, and capture_dead_clicks: false does not stop it either.

Measured against the three lists after the change, on /app/uv and /app/design: every PostHog request passes, and all of the extensions register (rrweb, initSessionRecording, initDeadClicksAutocapture, surveys, web vitals). What still does not: the very first batch of a visit goes to /e/ before the remote config arrives and renames the endpoint, so a blocker refuses it. That is a few events at the start of a session rather than all of them.

If a list ever names lazy-recorder.js, the next step is to carry the recorder the way dead clicks are carried, which no filter can name; it is 248 KB, which is why it was not done first.

When PostHog and Google's tag load (2026-09-29)

PostHog and Google's tag load after a page is ready, not while it is starting. Until 2026-09-29 posthog-js (171 KB) was imported by hooks.client.ts and ran before any page could hydrate, for every visitor including the ones who had declined cookies, and Google's tag was an async script in the head that ran in the middle of hydration. Measured on production at four times CPU slowdown, the two together were about 800 ms of the three seconds the workspace could not be clicked after "Open workspace".

  • PostHog is fetched when the page has loaded and the main thread goes idle (requestIdleCallback, at most four seconds after load), and only when cookie_consent is true. Without consent it never downloads. Every call made before it arrives (a page view, a product event, an exception, an identify) waits in a queue with the moment it happened, and runs in order once PostHog is ready, so events keep their real time. Code that captures events imports posthog from @/utils/posthog, whose capture and register queue the same way; importing posthog-js directly puts it back on the startup path of that page.
  • Google's tag (G-4W97BWMFR2) keeps its gtag('js') and gtag('config') calls inline in app.html, so the page view is queued in dataLayer from the first moment; the tag script itself is added when the page has loaded and gone idle, and sends what was queued. Google's tag still loads whatever the cookie answer is, as it did before: whether it should wait for consent is an owner decision.

A visitor who leaves within the first second or two, before the page goes idle, is not counted by either. Session replay starts at the same idle moment, so a recording begins a second or two into the visit.

Session replay records one session in five since 2026-09-29 (the owner's call: session_recording_sample_rate 0.20 in the PostHog project, set through the API; it was every session). PostHog decides per session, so a recorded visit is recorded whole. Surveys are switched off in the project (surveys_opt_in false; there were none, and the client still fetched surveys.js on every visit). Web vitals stay on: they are how real visitors' load times are read after the performance work.

Reading it

The funnels worth building in PostHog, all on surface = workspace: sign-in (auth_signin_started → auth_signin_completed, by surface), first file (workspace_opened → workspace_file_received → workspace_file_opened → workspace_job_created → workspace_job_completed → workspace_asset_downloaded), money (workspace_plans_opened → pricing_plan_selected → payment_subscription_checkout_started → payment_checkout_created), and Syntax (code_prompt_sent → code_reply_finished, broken down by model). Break any of them down by mode, game and tier, which every event carries.

Common questions

Does Zoovdev track me before I accept cookies? No. Capture is off by default and turns on only after Allow. Decline turns it off again and drops the id.

What does the workspace send about my files? The file's extension, its size and which tool opened it. Never the file, its name or its contents.

Can I see or delete my analytics data? Ask in the support channel; the owner can find and delete a person's events in PostHog by their user id.

Languages

Since 2026-09-20 this part of the site is available in English, French, German, Spanish, Portuguese, Polish and Dutch. It follows the browser's language on a first visit, and the language menu (the icon beside the profile in /app, or in the top navigation on public pages) changes it. Nothing about how it works, what it costs or what a plan includes differs by language; only the words do. File names, format names (GLB, YDR, YTD), product and model names, code, and some error lines that come from the server stay in English. Details and known gaps: Languages and translation.

Server events are sent after the response (2026-09-28)

image_generation_completed, image_texture_generated, tattoo_generation_completed, the image and tattoo exception reports and the checkout events (payment_checkout_created, payment_subscription_checkout_created, payment_saved_method_charge) are captured after the response is sent (Vercel waitUntil) instead of before it. Their names and properties are unchanged; their timestamps can be a second later than the response. The client entry no longer carries the OrbitControls shim (it moved to the 3D scenes), which changes nothing in analytics.

Steps and the way back (2026-10-16)

  • workspace_guide_toggled (tool: ped, animal, interior, uv, vehicle, convert; state: open, collapsed, closed; how: strip, toolbar, card, pill, switch): the steps strip of a guided tool changed (workspace.md, "One steps strip for every guided tool").
  • workspace_guide_step (tool, step, index, total, done): a step of a guided tool came on screen, however it was reached (the strip, Back, Continue, a tab, a tool's own jump). The Create tools' card sends it as convert:prop, convert:weapon, convert:clothing.
  • workspace_next_step_clicked gained plain (true for a way back rather than an AI step, with cost 0): the UV map tool's Open in Designer card for a car the Designer sent to be mapped.

Tópicos analyticsposthogtelemetryeventsconsentprivacyfunneltiktokpixeladsattribution

Faltou algo? Perguntar no Discord