How to Migrate from AppMeasurement.js to Web SDK: A Step-by-Step Guide

Published on: June 10, 2025
Updated on: June 10, 2025
30 Views
- Analytics
7 min read
As businesses strive for improved data collection, faster website performance, and real-time analytics, migrating from AppMeasurement.js to Adobe Experience Platform (AEP) Web SDK becomes essential. The Web SDK simplifies data tracking by consolidating multiple Adobe solutions, such as Adobe Analytics, Adobe Target, and Adobe Audience Manager, into a single integration.
However, transitioning to the Adobe Web SDK requires careful planning and execution. This guide will walk you through the migration process, covering:
- Understanding key migration considerations
- Conducting a pre-migration assessment
- Step-by-step implementation
- Testing and debugging strategies
- Best practices to ensure a smooth transition
If your business is still using AppMeasurement.js, this guide will help you successfully migrate to the Adobe Web SDK.
Key Considerations Before Migrating to Adobe Experience Platform Web SDK
Before you begin the migration, analyze your current implementation and determine the following:
A. What Are You Currently Tracking with AppMeasurement.js?
- Page Views
- Events (clicks, form submissions, video tracking)
- Custom variables (eVars, props, events)
- Campaign tracking
- Adobe Target/Audience Manager integrations
B. Do You Have a Data Layer in Place?
If your website already follows a structured data layer, migration will be smoother. Otherwise, you may need to restructure your data layer to align with Adobe's Experience Data Model (XDM).
C. Identify Dependencies on Other Adobe Tools
- Are you using Adobe Target (at.js)?
- Are you sending data to Adobe Audience Manager (DIL.js)?
- Do you use ECID (Experience Cloud ID) for visitor tracking?
Since Web SDK combines all these, you’ll need to adjust your tracking strategy accordingly.
Step-by-Step Migration Guide: From AppMeasurement.js to Web SDK
Phase 1: Planning the Migration
Effective migration planning ensures a smooth transition to a new system with minimal disruptions. It involves assessing requirements, setting timelines, and mitigating potential risks.
1. Conduct a Full Audit of Your AppMeasurement.js Implementation
- Identify all variables (eVars, props, events) currently being tracked.
- Determine which data needs to be migrated and optimized.
2. Align Data Collection with XDM
- Web SDK uses XDM format instead of traditional eVars/props/events.
- Define XDM schemas for each event you want to track.
- Example mapping:
- eVar1 → web.webPageDetails.name
- prop5 → web.webInteraction.type
- event3 → commerce.purchases
3. Set Up Adobe Experience Edge Configuration
- Web SDK routes data through Adobe Edge Network, so you must configure:
- Edge Configuration ID (for tracking data)
- Org ID (Adobe Experience Cloud ID)
Phase 2: Implementing Web SDK
Implementing a Web SDK enables seamless integration of third-party services into your application. It streamlines development by providing pre-built functions, reducing coding effort and ensuring compatibility.
4. Add Adobe Web SDK to Your Website
- Remove AppMeasurement.js, at.js, visitor.js.
- Add Web SDK as early as possible in the <head> tag.
<script>
!function(n,o){o.forEach(function(o){n[o]||((n.__alloyNS=n.__alloyNS||[]).push(o),
n[o]=function(){var u=arguments;return new Promise(function(i,l){
n[o].q.push([i,l,u])})},n[o].q=[])})}
(window,["alloy"]);
</script>
<script src="https://cdn1.adoberesources.net/alloy/latest/alloy.min.js" async></script>
5. Configure Adobe Web SDK
- After adding the script, initialize Web SDK with your Edge Configuration ID.
alloy("configure", {
"edgeConfigId": "[YOUR_EDGE_CONFIG_ID]",
"orgId": "ADB123@AdobeOrg",
"edgeDomain": "data.firstpartyserver.com"
});
6. Replace AppMeasurement.js Tracking Calls with Web SDK
- Old AppMeasurement.js Call (Tracking Page Views):
var s = s_gi("myReportSuiteID");
s.pageName = document.title;
s.eVar1 = "Home Page";
s.t();
- New Web SDK Call:
let xdmData = {
"web": {
"webPageDetails": {
"URL": document.URL,
"name": "home",
"server": document.domain
}
}
};
alloy("sendEvent", {
"type": "web.webPageDetails.pageViews",
"xdm": xdmData
});
7. Migrate Event Tracking (Clicks, Form Submissions, Video Tracking)
- Old AppMeasurement.js Click Tracking:
s.linkTrackVars = "eVar2,events";
s.linkTrackEvents = "event2";
s.eVar2 = "Button Clicked";
s.events = "event2";
s.tl(true, 'o', 'Click Event');
- New Web SDK Click Tracking:
let xdmClickEvent = {
"web": {
"webInteraction": {
"type": "click",
"name": "subscribe button"
}
}
};
alloy("sendEvent", {
"type": "web.webInteraction.linkClicks",
"xdm": xdmClickEvent
});
Phase 3: Testing & Debugging the Web SDK Implementation
Thorough testing and debugging of the Web SDK implementation ensure optimal performance and reliability. Identifying and resolving issues early helps prevent integration failures and enhances user experience.
8. Validate Web SDK Calls Using Adobe Experience Platform Debugger
- Install the Adobe Experience Platform Debugger Chrome Extension.
- Open the Web SDK tab and check events being sent.
9. Debug Network Calls in Browser Developer Tools
- Go to Network Tab → Filter Requests → Search for “interact”.
- Validate that Edge Network calls are successfully being sent.
10. Run A/B Tests for Migration
- Temporarily run both AppMeasurement.js and Web SDK in parallel.
- Compare data consistency before fully switching to Web SDK.
Best Practices for a Smooth Migration
Migrating to a new tracking system requires careful planning to avoid data loss and inconsistencies. Following best practices ensures a seamless transition, accurate data mapping, and optimal performance.
Phase 1: Migrate Page Views | Move page view tracking to the new system first. |
Phase 2: Migrate Events & Custom Variables | Transfer event tracking and custom variables after page views. |
Align XDM Structure | Ensure data fields are correctly mapped to business goals. |
Optimize Tracking Scripts | Remove any legacy tracking code that is no longer needed. |
Testing Before Deployment | Validate Web SDK events in staging before full deployment. |
Monitor for Errors | Use Adobe Experience Debugger to check if tracking calls fire correctly. |
Key Takeaways
- All-in-One Tracking – Web SDK unifies Adobe Analytics, Target, and Audience Manager.
- Plan Ahead – Audit existing tracking and align with XDM before migrating.
- Step-by-Step Switch – Remove old scripts, set up Web SDK, and update tracking calls.
- Test & Debug – Use Adobe Debugger and developer tools to ensure accuracy.
- Best Practices Matter – Migrate in phases, optimize scripts, and validate before launch.
Wrapping It Up!
Migrating from AppMeasurement.js to Adobe Web SDK is crucial for businesses aiming to future-proof their analytics strategy and enhance data collection capabilities. Adobe Web SDK offers a more efficient and streamlined approach, reducing dependency on multiple tracking libraries while improving website speed and performance. It also enables real-time data tracking, ensuring businesses make informed decisions faster.
By following a structured migration plan, organizations can seamlessly transition without losing critical data, ensuring that tracking remains accurate, scalable, and aligned with evolving business needs.
Still have questions about migrating from AppMeasurement.js to Adobe Web SDK? Drop them in the comments below and let's discuss!
Next Blog in the Series:
"Debugging Adobe Web SDK: Tools, Best Practices, and Troubleshooting"
Stay ahead in your analytics journey! Learn how to identify issues, optimize tracking, and ensure seamless data collection.
Frequently Asked Questions
Yes, but only temporarily for testing. Adobe recommends switching completely to Web SDK.
Your old data remains intact. Web SDK only changes how new data is collected.
It depends on your implementation complexity. For simple setups, migration takes ~2 weeks.
No, you can use existing report suites, but you may need to update processing rules.
Yes! Web SDK can be implemented via GTM like other tracking scripts.