Skip to content

Pass ConceptualHQ visitor ID and CTA placement to Calendly - #6825

Merged
Karakatiza666 merged 2 commits into
mainfrom
calendly-tracking
Aug 7, 2026
Merged

Pass ConceptualHQ visitor ID and CTA placement to Calendly#6825
Karakatiza666 merged 2 commits into
mainfrom
calendly-tracking

Conversation

@Karakatiza666

@Karakatiza666 Karakatiza666 commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

… to help track user journey in the public sandbox

There already was code that asynchronously loaded ConceptualHQ script that provides getDeviceId() through window.ca - a generated identifier that helps track the user on their journey through the public website and the sandbox;
This PR uses it to augment the link to Calendly to forward this device ID and the CTA placement (the location of the button in web-console which user clicked to book a demo) through Calendly

@Karakatiza666 Karakatiza666 added Web Console Related to the browser based UI javascript Pull requests that update Javascript code labels Aug 7, 2026

@mihaibudiu mihaibudiu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't look carefully at the tests

@mythical-fred mythical-fred left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small, well-scoped web-console change. The ConceptualHQ visitor ID and CTA placement now flow through Calendly via utm_content + prefixed utm_term, and the plumbing is clean: a module-level $state in useConceptualHq.svelte.ts seeded from window.ca?.getDeviceId?.() with a localStorage fallback and an SSR guard, refreshed on the loader's onload, plus a small pure bookADemoUrl() in calendly.ts behind decent unit tests. Callers are consistently migrated from triggerLocation to placement. Not a blocker in any way.

A few points worth confirming before merge; none block:

  1. Analytics event shape change is silent. useTryPipeline now emits demo_opened with placement in place of trigger_location, and BookADemo.svelte renames the calendly_opened property the same way. If PostHog dashboards or ConceptualHQ funnels key off trigger_location, they'll go blind after this ships. Either coordinate with whoever owns those dashboards, or send both keys for one release cycle and drop trigger_location after. Cheap either way.

  2. Calendly URL is quietly different. Old: https://calendly.com/d/cqnj-p63-mbq/feldera-demo. New (DEMO_URL in calendly.ts): https://calendly.com/d/cxz2-37b-qqd/feldera-demo-30min. That's a distinct event — different slug, different name. The PR body only says "augment the link"; it doesn't mention swapping the event. Please call it out in the description (and confirm the new event is the one sales wants bookings to land on).

  3. DemoTile.svelte still calls its own prop triggerLocation and forwards it into tryPipeline(demo, triggerLocation). Given every other component moved to placement, this is a small consistency wart — worth renaming for grep-ability. Not urgent.

  4. utm_content collision comment. The doc comment says "If the original link ever includes utm_content — carry visitorId in salesforce_uuid." That's a future-you note, not an enforcement — fine, but if the link ever does start carrying utm_content upstream, the current code will silently clobber it. Consider a console.warn when url.searchParams.has(VISITOR_ID_PARAM) before setting, so the migration doesn't happen invisibly.

  5. Loader race. refreshConceptualHqDeviceId fires on script.onload, but ConceptualHQ's getDeviceId() is only guaranteed once their loader has processed its q queue. In practice it's synchronous inside the loader, so onload is fine — just worth a code comment because it looks race-prone at first read.

Approve on the current tip (cec2115d); please address 1 and 2 in the PR body/coordination before merging so the analytics side isn't surprised.

@Karakatiza666

Copy link
Copy Markdown
Contributor Author
  1. It's fine since this prop hasn't been used actively yet
  2. The different Calendly URL is intentional - to use the same event as feldera.com does

Will address 3-5, they're worth doing.

…dly to help track user journey in the public sandbox

Signed-off-by: Karakatiza666 <bulakh.96@gmail.com>
Signed-off-by: Karakatiza666 <bulakh.96@gmail.com>

@mythical-fred mythical-fred left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fast turnaround. The three code-level nits from my last pass all landed:

  • DemoTile.svelte (+ its spec) now uses placement, matching every other component.
  • setTrackingParam emits a console.warn when the demo link ever ships with utm_content / utm_term of its own, so the salesforce_uuid migration won't happen invisibly. New spec assertion for the no-collision case locks it in.
  • Comment on script.onload = refreshConceptualHqDeviceId in conceptualHq.ts explains why the loader hook is not a race: the queue drain and getDeviceId install are synchronous inside the vendor script, so onload sees a fully-installed ca. Flags the deferred-work regression path for future readers.

Points 1 (silent trigger_locationplacement analytics rename) and 2 (Calendly slug swap cqnj-p63-mbq/feldera-democxz2-37b-qqd/feldera-demo-30min) are the two I flagged as coordination-not-code — as long as the PostHog/HubSpot side is aware before this ships, we're good.

Re-approving on 46b8f1df.

Merged via the queue into main with commit 328d846 Aug 7, 2026
1 check passed
@Karakatiza666
Karakatiza666 deleted the calendly-tracking branch August 7, 2026 10:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

javascript Pull requests that update Javascript code Web Console Related to the browser based UI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants