Skip to content

Send Fullstory the docs section and title of each page - #7065

Merged
jennifer-shehane merged 2 commits into
mainfrom
fullstory/page-properties
Nov 7, 2026
Merged

jennifer-shehane merged 2 commits into
mainfrom
fullstory/page-properties

Conversation

@jennifer-shehane

@jennifer-shehane jennifer-shehane commented Nov 7, 2026 •

Copy link
Copy Markdown
Member

The docs are a single-page app, so Fullstory only sees URL changes and
knows nothing about the page behind them. Building a funnel or journey
by docs section meant writing URL rules by hand. Setting page
properties on every navigation gives Fullstory a Page per section and
the page's own title to filter on.

plugins/fullstory-client.js runs on each pathname change and on first
load (hash-only changes are skipped) and calls
FS('setProperties', { type: 'page', ... }) with:

  • pageName: the section's display name, from a new SECTION_NAME map in
    src/sectionTitles.js
  • section: the first path segment
  • docTitle: document.title without the section suffix

onRouteDidUpdate fires before react-helmet-async writes the new title in
a requestAnimationFrame, so reading it right away sends the previous
page's title (verified against a build). The module waits two frames
first.

It's registered in every production build, with or without
FULLSTORY_ORG_ID, and does nothing without window.FS. That keeps it in
the CI build, so the new spec can test it with a stubbed FS and no org ID
reaches CI or the PR previews.

Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_01WUv8r5cSGdfxz44RN7uQft


Note

Low Risk
Client-side analytics metadata only, gated on window.FS and pathname changes, with no auth or data-handling impact.

Overview
Adds Fullstory page metadata on real pathname navigations so analytics can segment the SPA by docs section and page title instead of raw URLs.

A new fullstory-client.js Docusaurus client module hooks onRouteDidUpdate, skips hash-only changes, waits two requestAnimationFrame ticks so document.title reflects the new page, then calls FS('setProperties', { type: 'page', ... }) with pageName (section label + title), section, and docTitle (title with the section suffix stripped). src/sectionTitles.js now exports a SECTION_NAME map used for those prefixed page names.

The Fullstory plugin getClientModules() loads the client in production even without FULLSTORY_ORG_ID (snippet still gated); the module is a no-op when window.FS is missing, which lets Cypress stub FS and assert first load, sidebar navigation, hash-only nav, and distinct names when two sections share the same title.

Reviewed by Cursor Bugbot for commit c30d428. Bugbot is set up for automated code reviews on this repo. Configure here.

The docs are a single-page app, so Fullstory only sees URL changes and
knows nothing about the page behind them. Building a funnel or journey
by docs section meant writing URL rules by hand. Setting page
properties on every navigation gives Fullstory a Page per section and
the page's own title to filter on.

plugins/fullstory-client.js runs on each pathname change and on first
load (hash-only changes are skipped) and calls
FS('setProperties', { type: 'page', ... }) with:

- pageName: the section's display name, from a new SECTION_NAME map in
  src/sectionTitles.js
- section: the first path segment
- docTitle: document.title without the section suffix

onRouteDidUpdate fires before react-helmet-async writes the new title in
a requestAnimationFrame, so reading it right away sends the previous
page's title (verified against a build). The module waits two frames
first.

It's registered in every production build, with or without
FULLSTORY_ORG_ID, and does nothing without window.FS. That keeps it in
the CI build, so the new spec can test it with a stubbed FS and no org ID
reaches CI or the PR previews.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WUv8r5cSGdfxz44RN7uQft
@cypress

cypress Bot commented Nov 7, 2026 •

Copy link
Copy Markdown

cypress-documentation    Run #2802

Run Properties:  status check passed Passed #2802  •  git commit 5a6fc73be7 ℹ️: Merge c30d4282ea15b70ec27550e54694dabd99b1f3db into 435192ea23746373e5338fb2be48...
Project cypress-documentation
Branch Review fullstory/page-properties
Run status status check passed Passed #2802
Run duration 02m 16s
Commit git commit 5a6fc73be7 ℹ️: Merge c30d4282ea15b70ec27550e54694dabd99b1f3db into 435192ea23746373e5338fb2be48...
Committer Jennifer Shehane
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 432
View all changes introduced in this branch ↗︎
UI Coverage  32.91%
  Untested elements 738  
  Tested elements 26  
Accessibility  98.9%
  Failed rules  2 critical   5 serious   4 moderate   1 minor
  Failed elements 74  

pageName was the section's display name, which made each section a
single Fullstory Page. Page-level views such as page metrics and
heatmaps then lumped a whole section together, so nothing could be
analyzed per page without URL rules, the thing page properties were
meant to replace.

pageName is now "<section name>: <page title>", such as
"API: cy.check()". The section prefix keeps it unique: the profiles
pages in Cypress Accessibility and UI Coverage share a title, and
title alone would merge them into one Page. The 338 pages sit well
under Fullstory's 7,500 pageName limit. section and docTitle are still
sent, so section-level funnels keep working.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WUv8r5cSGdfxz44RN7uQft
@jennifer-shehane
jennifer-shehane merged commit 9e14372 into main Nov 7, 2026
21 checks passed
@jennifer-shehane
jennifer-shehane deleted the fullstory/page-properties branch November 7, 2026 04:08
@cypress

cypress Bot commented Nov 7, 2026

Copy link
Copy Markdown

cypress-documentation    Run #2803

Run Properties:  status check passed Passed #2803  •  git commit 9e14372e81: Send Fullstory the docs section and title of each page (#7065)
Project cypress-documentation
Branch Review main
Run status status check passed Passed #2803
Run duration 02m 13s
Commit git commit 9e14372e81: Send Fullstory the docs section and title of each page (#7065)
Committer Jennifer Shehane
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 2
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 432
View all changes introduced in this branch ↗︎
UI Coverage  32.91%
  Untested elements 738  
  Tested elements 26  
Accessibility  98.92%
  Failed rules  2 critical   5 serious   4 moderate   1 minor
  Failed elements 73  

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants