Repository navigation
Enable Reo third-party tracking on Learn - #3232
Conversation
Add enableThirdPartyTracking: true to the existing Reo.init call. Script loading and the window load init timing are unchanged. The flag adds 28 bytes to every rendered page, which changes the SNMP Profile Format heavy-page identity (518,446 -> 518,474 bytes). Replace the stale 518,341-byte entry with the new identity and keep the 518,446-byte entry so master and open pull requests still pass until this merges.
✅ Deploy Preview for netdata-docusaurus ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
There was a problem hiding this comment.
1 issue found across 2 files
Confidence score: 3/5
docusaurus.config.jsenables Reo tracking for visitors who haven’t accepted Performance Cookies. Gate the script andReo.initon consent, or keep tracking disabled for visitors who decline.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="docusaurus.config.js">
<violation number="1" location="docusaurus.config.js:296">
P2: This enables Reo third-party tracking for every visitor without a consent gate. Gate both the Reo script and `Reo.init` on accepted Performance Cookies, or keep this option disabled for visitors who decline tracking.</violation>
</file>
Architecture diagram
sequenceDiagram
participant Browser as Browser
participant Docusaurus as Docusaurus Config
participant ReoScript as Reo Script (External)
participant ReoInit as Reo Tracking API
participant ThirdParty as Third-Party Trackers
participant Gate as Site Build Gate
Note over Browser,ThirdParty: Reo Third-Party Tracking Flow
Browser->>Docusaurus: Load rendered page
Note over Docusaurus: docusaurus.config.js<br/>Reo.init configured with<br/>clientID + enableThirdPartyTracking
Browser->>ReoScript: Load Reo external script
ReoScript-->>Browser: Reo global object available
Browser->>Browser: window.load event fires
Browser->>ReoInit: Reo.init({ clientID, enableThirdPartyTracking: true })
Note over ReoInit: NEW: Third-party tracking enabled<br/>(adds 28 bytes to page identity)
opt Reo undefined
Browser->>Browser: Skip Reo.init call
end
ReoInit->>ThirdParty: Enable third-party tracking integrations
ThirdParty-->>ReoInit: Tracking ready confirmation
Browser->>Gate: Post-build verification
Note over Gate: site-build-gate-baseline.json<br/>SNMP heavy-page identity updated
alt SNMP Profile Format page
Gate-->>Gate: Check page size (518,474 bytes)
Gate-->>Gate: Match updated identity hash
Gate-->>Browser: Allow (no regression)
else Other pages
Gate-->>Gate: Verify size thresholds
Gate-->>Browser: Allow (unchanged)
end
Tip: Get a Slack DM when cubic finishes reviewing your PRs. Connect Slack
View guided diff | Turn on auto-fix | Re-trigger cubic
| window.addEventListener('load', function() { | ||
| if (typeof Reo !== 'undefined') { | ||
| Reo.init({ clientID: '8a197d1119ef2d4' }); | ||
| Reo.init({ clientID: '8a197d1119ef2d4', enableThirdPartyTracking: true }); |
There was a problem hiding this comment.
P2: This enables Reo third-party tracking for every visitor without a consent gate. Gate both the Reo script and Reo.init on accepted Performance Cookies, or keep this option disabled for visitors who decline tracking.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At docusaurus.config.js, line 296:
<comment>This enables Reo third-party tracking for every visitor without a consent gate. Gate both the Reo script and `Reo.init` on accepted Performance Cookies, or keep this option disabled for visitors who decline tracking.</comment>
<file context>
@@ -293,7 +293,7 @@ module.exports = {
window.addEventListener('load', function() {
if (typeof Reo !== 'undefined') {
- Reo.init({ clientID: '8a197d1119ef2d4' });
+ Reo.init({ clientID: '8a197d1119ef2d4', enableThirdPartyTracking: true });
}
});
</file context>
Summary
enableThirdPartyTracking: trueto the existingReo.initcall indocusaurus.config.js.scripts[]entry) and init timing (window.load) are unchanged.Page-size baseline
The flag adds 28 bytes to every rendered page (minified
,enableThirdPartyTracking:!0). That changes the SNMP Profile Format heavy-page identity from 518,446 to 518,474 bytes, soconfig/site-build-gate-baseline.jsonis updated:Verification
docusaurus build+scripts/run-post-build-gates.mjs(Node 22): gate exit 0, no regressions; the SNMP page is an accepted finding.node --test tests/site_build_gate.test.js: 4 passed, 0 failed.Summary by cubic
Enables Reo third-party tracking on Learn by adding
enableThirdPartyTracking: trueto the existingReo.initcall indocusaurus.config.js. Script loading andwindow.loadinit timing are unchanged.Site build gate baseline
Written for commit d218a44. Summary will update on new commits.
Summary by CodeRabbit