Repository navigation
docs: align README and addon docs with the code - #387
Merged
Merged
Conversation
Fix examples that broke or misbehaved as written (cid variant, targeting callbacks, TargetingRequest type, error-message interpolation, ctxSegments -> loadGAM, GAM secure signals shape, prebid analytics tenant option and import path, multi-node resolver types). Correct descriptions that did not match behaviour: bot detection and RTD, nonexistent TargetingResolvedThisSession/MarkTargetingResolved, multi-node priority rules, contextual pageview timing, readOnly, deprecated prebidORTB2, analytics hooks, identifyAndTokenize edge cases, OIS change event detail, source-check timeout, demo host and prerequisites. Document previously undocumented InitConfig options, npm addon imports, UID2 refresh, setupAB, traffic source, GAM signal enrichment and other SDK methods, and regenerate the table of contents. Fix import paths and claims in the addon docs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The examples used !!sessionStorage.optableDebug, which is true for ?optableDebug=0 because flag values are strings. Use flagEnabled() and reword the Debugging note to point at the QA flag. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 of 4 tasks
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mosherBT
approved these changes
Nov 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
An audit of the README against the code found broken examples, descriptions that no longer match behaviour, references to functions that don't exist, and public features with no documentation.
What Changed
Examples that broke or misbehaved as written
OptableSDK.cid("id2", "c2")threw (variant must be 0–19); nowcid("id2", 2).targetingvariable; now useresponseand log objects instead of printing[object Object].TargetingRequesttype corrected to{ ids, hids }, with a hashed-email example."${err.message}"in double quotes, so the message was never interpolated.ctxSegments().then(loadGAM)passed the raw response to GAM; now passesctxTargetingKeyValues().{ provider, id }objects passed as separate arguments (wasvalue, in one array).tenantoption (tenant comes fromnode); import path nowlib/dist/addons/....Descriptions corrected
TargetingResolvedThisSession()/MarkTargetingResolved()(they don't exist) and the claim thatSkipTargetingForBots()short-circuits RTD; added a working alternative.user.datais merged from every rule.ctxSegments()caching on failure, elided example outputs.readOnly, deprecatedprebidORTB2(), analytics hooks, GPT listener re-calls,identifyAndTokenizeedge cases, PAIR storage, OIS change-eventdetail, source-check timeout, demo host and prerequisites.Newly documented
InitConfig:pageContextkeys,consent,timeout,sessionID,skipEnrichment,additionalTargetingSignals,abTests,legacyHostCache,mockedIP,insecure.tryIdentifyFromParamsaddons.setupAB, traffic source, GAM signal-enrichment key-value,persistFlagsFromURL, and an "Other SDK methods" table.Addon docs
abTestAssignment.md,prebid/README.md,prebid/analytics.md: import paths nowlib/dist/addons/....botDetection.md: same RTD correction as the README.prebid/analytics.md:initPrebidAnalyticstakes your SDK instance;samplingRateFnonly applies whensamplingRateis between 0 and 1.