Home AppMeasurement Web SDK · Migration Guide Created by Amit G Dusane

Migration › Build the Send Event rule

Step 09 of 13
69% complete

Build the Send Event rule

In the old world, two functions did your sending: s.t() for page views and s.tl() for clicks, each firing its own beacon. The Web SDK replaces both with a single command, sendEvent, that carries the payload you just assembled to the Edge. In Launch this becomes a rule with two actions: one that fills your variable object, one that sends it. The entire art of this step is making those two happen in that order, because Launch will cheerfully fire the send before the variables are set if you let it.
What to do
1
Where Tags › Rules › Add Rule
Do Event = Core › Window Loaded (a page view). For clicks, use the relevant interaction event.
2
Do Action 1 = AEP Web SDK › Update Variable → target XDM - Global (replaces "Adobe Analytics, Set Variables").
3
Do Action 2 = AEP Web SDK › Send Event (replaces "Send Beacon")[31].
Value Type web.webpagedetails.pageViews (page views) · web.webinteraction.linkClicks (clicks)[33] · data %XDM - Global%.
BEFORE · AppMeasurement s.t() page-view beacon s.tl() link beacon AFTER · Web SDK Order 1 ① Update Variable → XDM - Global then Order 50 ② Send Event type web...pageViews one sendEvent Run rule components in sequence
Two legacy beacons (s.t(), s.tl()) collapse into one sendEvent, fed by two ordered actions: Update Variable (low Order) then Send Event (high Order).
⚠ Common mistake

Leaving rule Order at defaults, so a Send Event fires before the variables populate. The payload arrives missing half its data. Fix: variable rules low Order (1), terminal Send Event high Order (50); enable "Run rule components in sequence."

⚠ Kill the global s object

Any custom code referencing s.eVar1 / s.events throws once AppMeasurement is removed. Rewrite it to populate XDM - Global and dispatch via Send Event.

✓ You should see

One sendEvent in the Debugger of type pageViews, carrying all your variables in a single payload.