Skip to content

Reference

Events

Every event includes: sessionId, sessionPageCount, path, hash, title, viewportCategory, browserFamily, deviceType, language, and timezoneOffset.

EventDescriptionKey fields
page_viewFires on every page load or SPA navigation.referrerDomain, referrerCategory, aiPlatform, isFirstPage, previousPath
link_clickInternal, external, anchor, or email link click.linkType, targetUrl, linkText, linkContext, linkSection, linkIndex
scroll_depthUser scrolls past a configured threshold.threshold, scrollPercent
page_exitFires on beforeunload.totalTimeSeconds, activeTimeSeconds, engagementRatio, maxScrollDepth, referrerCategory, aiPlatform
search_openedUser opens the search dialog (click or Cmd/Ctrl+K).trigger
code_copiedUser clicks a code block's copy button.language, codeSection, codeBlockIndex
section_visibleA heading stayed visible in the viewport long enough to read.heading, headingLevel, visibleSeconds
tab_switchUser switches a code language/framework tab.tabLabel, tabGroup, isDefault
toc_clickUser clicks an entry in the on-page table of contents.heading, headingLevel, tocPosition
feedbackUser clicks a "Was this helpful?" button.rating
expand_collapseUser toggles a <details> element or accordion.summary, action, section

AI traffic detection

Do11y classifies referrer domains to detect traffic from AI platforms. Each page_view event includes:

FieldValuesDescription
referrerCategoryai, search-engine, social, community, code-host, direct, internal, other, unknownHigh-level traffic source category.
aiPlatformChatGPT, Perplexity, Claude, Gemini, Copilot, DeepSeek, Meta AI, Grok, Mistral, You.com, Phind, or nullSpecific AI platform when referrerCategory is ai.

Detection is referrer-based: it checks whether document.referrer hostname matches a known AI platform. No fingerprinting, user-agent parsing, or additional data collection.

Limitation: Most AI platforms (especially ChatGPT mobile and API-sourced visits) don't pass referrer headers. Those visits appear as direct traffic. Referrer-based detection typically captures 20–40% of AI traffic. Detecting the remaining "dark AI" traffic would require fingerprinting techniques that conflict with Do11y's privacy-first design. Partial signal is still actionable. If a specific page consistently receives referrals from ChatGPT or Perplexity, that tells you something real about how agents are using your content, even if the true volume is higher than the data shows.

JavaScript API

Do11y exposes window.AxiomDo11y for debugging and integration:

javascript
AxiomDo11y.getConfig()    // Current config (token redacted)
AxiomDo11y.isEnabled()    // Whether tracking is active
AxiomDo11y.flush()        // Force-send queued events
AxiomDo11y.getQueueSize() // Number of queued events
AxiomDo11y.version        // Script version

cleanup() and debug() are intentionally not exposed on the global object. Exposing cleanup() would allow any third-party script on the page to silently stop tracking. Exposing debug() would allow any script to enable verbose console output that reveals the configured ingest endpoint and queued event data.

Known limitations

Custom themes

The selectors work on sites using the standard theme of each supported framework. Heavily customized themes render elements differently. If you use a custom theme, set selectors manually using the custom framework option.

Framework selector drift

CSS selectors reflect each framework's current DOM output and may break when frameworks release major updates that change class names or HTML structure. The test suites exist specifically to catch this. Run them periodically to verify selectors still match.

Released under the MIT License.