@avsbhq/snippet-types 1.1.0 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/avsb.d.ts +4 -2
- package/package.json +1 -1
package/avsb.d.ts
CHANGED
|
@@ -349,8 +349,8 @@ interface AvsbUtils {
|
|
|
349
349
|
|
|
350
350
|
// --- Experiment decisions ---
|
|
351
351
|
|
|
352
|
-
/** Why an experiment did or did not run for this visit. `variant` / `control` mean the visitor is IN the test. */
|
|
353
|
-
type AvsbDecisionStatus = 'variant' | 'control' | 'trigger-pending' | 'not-targeted' | 'audience-mismatch' | 'excluded' | 'traffic-holdout' | 'capped' | 'scheduled-off' | 'error'
|
|
352
|
+
/** Why an experiment did or did not run for this visit. `variant` / `control` mean the visitor is IN the test. `self-redirect` also means IN the test: the visitor is bucketed to a split-URL variant whose destination is the page they are already on, so the redirect was refused instead of looped. */
|
|
353
|
+
type AvsbDecisionStatus = 'variant' | 'control' | 'trigger-pending' | 'self-redirect' | 'not-targeted' | 'audience-mismatch' | 'excluded' | 'traffic-holdout' | 'capped' | 'scheduled-off' | 'error'
|
|
354
354
|
|
|
355
355
|
/** One row of `avsb.getExperimentDecisions()`. The variation fields are present only when a variation was assigned. */
|
|
356
356
|
interface AvsbExperimentDecision {
|
|
@@ -398,6 +398,8 @@ interface AvsbApi {
|
|
|
398
398
|
commerce: AvsbCommerceApi
|
|
399
399
|
/** Leave a shared preview link: clears the preview token and reloads. */
|
|
400
400
|
exitPreview(): void
|
|
401
|
+
/** After a split-URL redirect in this tab: the referrer of the page the visitor was redirected FROM, captured before the redirect so your analytics can undo the self-referral. `''` means that visit was direct; `null` means no redirect has happened (or storage is unavailable). Same-origin only, so a destination on a different domain cannot read it. Optional: absent on snippet builds that predate it, so read it as `avsb.getOriginalReferrer?.()`. */
|
|
402
|
+
getOriginalReferrer?(): string | null
|
|
401
403
|
/** Re-run every experiment against the page as it is now. For app-driven navigation the History API never sees. */
|
|
402
404
|
refresh(): void
|
|
403
405
|
/** The snippet build running on this page, e.g. `1.1.0`. */
|