HomeImplementation › Web SDK and the Edge Network

Web SDK and the Edge Network

Purpose: Understand how Web SDK sends data to Adobe's Edge Network.

Who this page is for

AudienceWhy it matters to you
Implementation engineersThis is how data flows in 2026
ArchitectsUnderstand the modern infrastructure

Web SDK and the Edge Network

Web SDK is Adobe's modern JavaScript library for data collection. It sends data to Adobe's Edge Network instead of directly to Analytics.

Why the Edge Network?

Previously, AppMeasurement sent data directly to Adobe Analytics:

Browser → Adobe Analytics servers

This was single-purpose. Web SDK sends to Edge, which routes to multiple solutions:

Browser → Adobe Edge Network → Analytics + Real-time CDP + AJO + ...

Benefits:

Installing Web SDK

Via Tags (recommended)

  1. In Adobe Tags, install "Web SDK" extension
  2. Configure datastream ID
  3. Create rules to send events
  4. Deploy

No code needed. You configure in UI.

Via direct script

<script>
!function(n,e){window.alloy_queue=window.alloy_queue||[],window.alloy=function(){window.alloy_queue.push(arguments)};var t=e.createElement("script");t.async=!0,t.src="https://cdn1.adoberesources.net/alloy/2.6.4/alloy.min.js",e.head.appendChild(t)}(window,document);

// Configure
alloy("configure", {
  edgeConfigId: "YOUR-CONFIG-ID",
  orgId: "YOUR-ORG-ID@AdobeOrg"
});

// Send event
alloy("sendEvent", {
  xdm: {
    web: { webPageDetails: { name: "Homepage" } },
    eventType: "web.webpagedetails.pageViews"
  }
});
</script>

Sending events

Web SDK sends "events" (not hits). Each event is a user action.

alloy("sendEvent", {
  xdm: {
    web: {
      webPageDetails: {
        name: "Product Page"
      }
    },
    device: {
      type: "Mobile"
    },
    eventType: "web.webpagedetails.pageViews"
  }
});

Datastreams

A datastream (formerly called config) defines how data flows from Edge to destinations.

In a datastream, you configure:

You can have multiple datastreams (dev, staging, prod).

Data mapping

Web SDK sends XDM data. You map it to Analytics variables in the datastream:

XDM field: xdm.web.webPageDetails.name
→ Maps to: Analytics prop5

XDM field: xdm.commerce.order.priceTotal
→ Maps to: Analytics revenue variable

This mapping is done in the datastream UI, not in code.

Consent before sending

Web SDK can check consent before sending data:

alloy("setConsent", {
  consent: [{
    standard: "IAB TCF",
    version: "2.0",
    value: consentString
  }]
});

Edge respects consent. If user hasn't consented, data is collected but not sent to Analytics.

Server-side forwarding

You can send data from your server using the Edge API:

curl -X POST https://edge.adobedc.net/ee/v2/interact
-H "Content-Type: application/json"
-d '{
  "events": [{
    "xdm": {
      "eventType": "order.completed",
      "commerce": {
        "order": {
          "priceTotal": 99.99,
          "currencyCode": "USD"
        }
      }
    }
  }]
}'

Use this for backend events (order processed, payment failed, etc.).

Debugging Web SDK

Use the browser console:

// Enable debug mode
alloy("configure", {
  debugEnabled: true
});

// Now all events log details to console

Or use the AEP Debugger extension (browser plug-in) to see events in real-time.

Migration from AppMeasurement

If you're moving from AppMeasurement to Web SDK:

  1. Install Web SDK alongside AppMeasurement (dual implementation)
  2. Validate Web SDK sends correct data
  3. Migrate audiences gradually (10% → 50% → 100%)
  4. Sunset AppMeasurement

Takes 2-6 weeks depending on implementation complexity.

---

Next: XDM schemas and field groups

Quick navigation