Next Commerce
Data AttributesURL ParametersReference

Attributes

param.<name> Syntax

Access any URL parameter inside a conditional attribute (data-next-show, data-next-hide) using param.<name>. Replace <name> with the URL query parameter name (case-sensitive).

<div data-next-show="param.variant == 'a'">
  Variant A only
</div>

Operators

OperatorDescriptionExample
==Equal (with type coercion)param.mode == 'advanced'
!=Not equalparam.theme != 'dark'
>Greater than (numeric)param.qty > 5
<Less than (numeric)param.age < 18
>=Greater than or equalparam.qty >= 3
<=Less than or equalparam.qty <= 10
&&Logical ANDparam.a == 'x' && cart.hasItems
||Logical ORparam.banner == 'n' || param.theme == 'dark'
!Logical NOT!param.preview
param.name (no operator)Truthy check — fires when the parameter existsparam.preview

Lifecycle

  1. Capture — On SDK init, all current URL parameters are read into sessionStorage.
  2. Persist — Parameters survive navigation. Stored values remain accessible on pages that don't include the parameter in their URL.
  3. Override — A new value on a later page overrides the stored value.
  4. Re-evaluate — Conditional elements re-evaluate every time a parameter is set, cleared, or changed.

JavaScript API

MethodDescription
next.getParam(name)Returns the value or undefined
next.getAllParams()Returns all parameters as an object
next.hasParam(name)Returns true when the parameter is set
next.setParam(name, value)Set a parameter (re-evaluates conditionals)
next.setParams(object)Set multiple parameters
next.clearParam(name)Remove a parameter

See JavaScript API for examples.


Common Conventions

A few parameter names that are commonly used in production landing pages. None of these are reserved by the SDK — they are just conventions.

ParameterConventionUse
?reviews=nn = noHide customer testimonials section
?timer=nn = noHide countdown timers
?banner=nn = noHide promotional banner
?seen=nn = noHide "as seen on" media logos
?exit=nn = noDisable exit-intent popup
?variant=a / ?variant=bA/B testingShow one variant of a test
?debug=truetrue = enabledShow debug-only content
?preview=truetrue = enabledShow preview-only content

Notes

  • Parameter names are case-sensitive?Variant=a is different from ?variant=a.
  • The Webflow page builder strips quotes from attribute values. The SDK conditional parser accepts both param.x == 'n' and param.x==n syntactically.
  • Parameters are stored as strings in sessionStorage. Numeric comparisons work because the parser coerces both sides to numbers when the operator is numeric.
  • Use forcePackageId to pre-populate the cart from a URL — see Cart System → State → Force Package ID.

On this page