Add LinkedIn Insight Tag and Dreamdata tracking#46
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Tightened the production gate so trackers don't fire on Vercel preview deployments (was flagged as a known issue in the PR body). What changed (
Test plan update: the step that says |
2e8deb8 to
03f9d66
Compare
51ddf48 to
df6f487
Compare
Browser tracking scripts on oxide.computer don't carry over to the explorer.oxide.computer subdomain — each host is its own scripting context and the consent cookie isn't shared. Port the same trackers the main site uses (LinkedIn Insight Tag, Dreamdata cookied + cookieless) along with the consent banner that gates them. The Dreamdata IIFE snippets are copied byte-for-byte from oxide- computer; the consent helpers and popup UI are adapted for a Vite SPA (no SSR, no react-router, no careers exclusion, no forms). Trackers only render when import.meta.env.PROD is true. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
The repo went open-source on main while this branch was open. The license-eye check requires the standard MPL-2.0 + Oxide copyright header on all ts/tsx files; add it to the three new source files. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
df6f487 to
206aa83
Compare
Mounting inside the left <nav> block left the popup trapped in three ways: hidden under 1000px (nav has max-1000:hidden), blocked by the landing modal (parent is z-10, modal is z-20), and tied to the left column's flow layout. Move it back to a top-level MotionConfig child and give it explicit `fixed bottom-4 left-4 z-100` so it floats above everything and stays clickable while other modals are open. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
Pushed 0461b5b — lifted |
|
Hmm lifting it out means it's not reflowing the left card to fit both. It's tricky because all four corners have important stuff that we don't want to obscure. |
Restore Ben's mount inside the left <nav> so the popup reflows with the Outline card and tour button instead of floating over them. Gate the visible banner on !isLandingOpen so it appears only after the user dismisses the landing modal — no more banner peeking out around the modal, no overlap competition between two prompts. Trackers still init via useEffect, so the cookieless pageview fires immediately on load even while the banner is hidden. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
Fair point — pushed 61c5b90 reverting to your sidebar mount so the nav reflows again. Handled the landing-modal overlap by gating the visible banner on |
This reverts commit 61c5b90.
This reverts commit 0461b5b.
|
Robot Kevin back off! |
|
Standing down. 🫡 |
2-3 fixed |


Summary
Browser tracking scripts loaded on
oxide.computerdon't carry over toexplorer.oxide.computer— each subdomain is its own scripting context and the consent cookie isn't shared across them. This installs the same LinkedIn Insight Tag and Dreamdata (cookied + cookieless) trackers the main site uses, gated by an equivalent cookie consent banner, so the 3D explorer contributes to LinkedIn ad attribution and Dreamdata B2B analytics.The Dreamdata vendor IIFE snippets are copied byte-for-byte from oxide-computer/app/util/dreamdata.ts — they're two-stage bootstrappers (shim
window.dreamdataas a method buffer, then inject the real SDK), so a plain<script src>would lose any calls made before the SDK lands.Changes
src/util/tracking.ts— consent cookie helpers (hasAcceptedTracking,acceptTracking,rejectTracking,hasTrackingChoice)src/util/dreamdata.ts— both Dreamdata IIFEs asconststrings (verbatim)src/components/CookiePopup.tsx— bottom-right banner with Reject/Accept; injects LinkedIn + cookied Dreamdata on accept, cookieless Dreamdata on mount for undecided userssrc/App.tsx— mounts<CookiePopup />at the top ofMotionConfig(outside thepointer-events-noneoverlay container)package.json/bun.lock— addsjs-cookieand@types/js-cookieDecisions (per author)
ox-accept-tracking) but nodomainset, so accepting on the main site doesn't carry over here and vice versa. Independent consent decision per host.oxide.computer/privacy-policyexternally. No new route added to this repo.import.meta.env.PROD. Dev (bun run dev) won't load any trackers.What's not ported (and why)
dreamdata.page()tracking — rack-explorer is a single URL with state changes (selection, tours) that don't change the route. The snippet's built-in.page()covers the one true pageview.trackFormSubmissionand server-side LinkedIn lead conversion — no forms in this app.<script>tag + a_6si.push(['disableCookies', false])ininitTrackers).Things to know before merging
prefer-tag-over-roleon<div role=\"dialog\">). Matches the source pattern in oxide-computer exactly. The codebase already has 4 pre-existing oxlint errors of similar nature; not addressing here to preserve byte-for-byte parity with the source. Easy to fix later with<dialog open>+ a couple of CSS resets.Test plan
bun installcleanly (lockfile is in the commit)bun run buildsucceedsbun run dev— confirm banner does NOT appear (dev mode)bun run previewagainst the production build:cdn.drda.io/.../dreamdata.cl.min.js(cookieless snippet auto-loaded)ox-accept-tracking=truecookie is set, Network tab shows new requests tosnap.licdn.com/li.lms-analytics/insight.min.js,px.ads.linkedin.com/collect/?pid=6206948&fmt=gif, andcdn.dreamdata.cloud/.../dreamdata.min.jsox-accept-tracking=false, only cookieless Dreamdata loads, no LinkedIn requests🤖 Generated with Claude Code