Lab · The full sandbox

Type, run,
read the wire.

A complete mock of the s object. Every property you can set in real AppMeasurement — eVar1 through eVar250, prop1 through prop75, hier, list, events, products, link tracking, linkTrackVars, clearVars. The simulator decodes whatever you fire, exactly the way Adobe's collection servers would receive it. Press ⌘↵ or Ctrl↵ to run.

Workspace

Three workspaces below: a starter scenario, a blank slate, and a reference card. Pick the one that matches what you want to practice. All three use the same simulator engine — output from any of them mirrors a real AppMeasurement hit.

Scenario · End-to-end purchase journey

The starter code below fires four hits: a campaign landing, a product view, an add-to-cart link hit, and a purchase. Verify each parameter on the wire. Then mutate it — add eVars, change the products string, serialize the purchase. The simulator will not bite.

code · journey.js
network · captured hits

Scenario · Blank slate

Empty editor. Fire whatever you like.

code · scratch.js
network · captured hits

Reference · Querystring abbreviations

VariableWire paramNotes
s.pageNamepageName=Identifies the page in reports
s.channelch=Site section / hierarchy root
s.eVar1s.eVar250v1=v250=Conversion variables — persist
s.prop1s.prop75c1=c75=Traffic variables — hit-only
s.hier1s.hier5h1=h5=Hierarchy strings
s.list1s.list3l1=l3=List eVars
s.eventsevents=Comma-delimited; numeric/currency use =
s.productsproducts=Semicolon-delimited fields, comma-delimited products
s.purchaseIDpurchaseID=Serializes the purchase event
s.tl(...)pe=lnk_o / lnk_d / lnk_eLink tracking type
linkTrackVarsWhitelist for tl() hits

Exercises

A · Multi-product purchase

Two SKUs, two prices

In the journey scenario, change Hit 4's products to two products with different prices. Verify the comma-and-semicolon encoding on the wire.

B · Merchandising eVar

Bind eVar20 to a SKU

In Hit 2's products string, add an eVar20 binding: ;ASTRO-3000;;;;eVar20=organic-search. Verify it appears on the wire.

C · Forget clearVars

The leak bug

Remove the s.clearVars() from Hit 2. Re-run. Observe eVar15, eVar1, and the campaign event are still on the second hit. This is the #1 SPA bug from module 07.

D · Forget linkTrackVars

The whitelist bug

Remove the linkTrackVars and linkTrackEvents lines from Hit 3. Observe that the link hit no longer carries the event or products. This is the #1 link-tracking bug from module 06.

E · Hier and list

Path and tags

Add s.hier1 = "Shop|Telescopes|Refractors|Astro-3000" and s.list1 = "weight:14lb,color:black,brand:meade" to Hit 2. Confirm both appear with the correct wire prefixes.

F · Numeric event

Add shipping cost

In Hit 4, change events to include a numeric event: "purchase:ORD-44210,event50=12.99". Confirm the encoding.