Adobe Target · updated

How to migrate Adobe Target from at.js to the Web SDK

Moving Target from at.js to the Experience Platform Web SDK means replacing one JavaScript library with another, not upgrading it. The Web SDK (alloy.js) sends one request for all Adobe applications through a datastream, where at.js sends its own Target request. Adobe publishes a migration tutorial; the work is mostly in the page code, the prehiding snippet and anything that reads Target's answers.

In plain words

Today your pages load a Target file called at.js. Adobe's newer approach is one shared file, the Web SDK, that serves Target, Analytics and the other Adobe applications together. Your tests and personalisation keep working, but the code that asks for them and the settings around it change. It is a project for developers, and it needs the analytics team in the room because both teams now share one request.

What Adobe says is different

Areaat.js 2.xWeb SDK
Libraryat.js for Target, with Visitor.js and AppMeasurement.js for the other applicationsOne library, alloy.js, for all Adobe applications
RequestsA separate call for each applicationA single call for all applications; a change to the data can affect several of them
NetworkAdobe Experience Cloud Edge Network (tt.omtrdc.net)Adobe Experience Platform Edge Network (edge.adobedc.net)
Load orderLibraries and calls must load in a set orderAdobe says load order is not a concern
Termsmbox, pageLoad event (global mbox), offerdecisionScope, the __view__ decisionScope, proposition

Adobe states plainly that the Web SDK is not an evolution of at.js. It is a new, unified way to implement all Adobe applications on the web.

How at.js calls map to Web SDK commands

Taskat.jsWeb SDK
Fetch and render page-load offersAutomatic when pageLoadEnabled is onsendEvent with renderDecisions: true
Fetch without renderinggetOffer or getOfferssendEvent with decisionScopes: ["__view__"]
Fetch a named mboxgetOffer with the mbox namesendEvent with the mbox name in decisionScopes
Apply offersapplyOffer or applyOffersapplyPropositions
Track an eventtrackEvent or sendNotificationssendEvent with eventType decisioning.propositionDisplay or decisioning.propositionInteract
Single-page app view changetriggerView("homeView")sendEvent with xdm.web.webPageDetails.viewName
Profile attributesprofile. parameters on getOffer or getOffersdata.__adobe.target with keys prefixed profile.
Recommendations dataentity. parametersdata.__adobe.target with keys prefixed entity.
Third-party IDmbox3rdPartyIdidentityMap, with the namespace set on the datastream
Property tokenat_property in targetPageParamsSet on the datastream, under the Adobe Target service
Global settings overridewindow.targetGlobalSettingsNot supported in the Web SDK

What does not carry over

  • On-device decisioning. Adobe's tutorial says this feature is not supported by the Web SDK.
  • The Implementation methods settings in Target's Administration screen. Adobe says all editable settings there apply to at.js only.
  • The at.js prehiding snippet. The Web SDK uses a different style ID, alloy-prehiding, and Adobe warns the at.js snippet may not work properly.
  • window.targetGlobalSettings. Adobe's comparison page lists it as not supported in the Web SDK.

Moving page by page

Adobe says that if at.js and the Web SDK are used at the same time you may see rendering and tracking issues, so a page should load one or the other. For a site that moves page by page, the tutorial sets two options in the Web SDK configuration: targetMigrationEnabled, which lets the Web SDK read and write the mbox and mboxEdgeCluster cookies at.js uses, and idMigrationEnabled, which reads and sets the older AMCV cookies. Adobe's configuration page adds that overrideMboxEdgeServer should be enabled in targetGlobalSettings on the pages still on at.js.

Adobe's at.js version page says at.js 1.x is in maintenance mode and at.js 2.x has full support. We found no end-of-support date for at.js on Adobe's pages, so this page gives none.

Web SDK configuration for a page-by-page migration, as Adobe's tutorial writes it (the datastream ID and organisation ID are Adobe's placeholders)

alloy("configure", {
  "edgeConfigId": "ebebf826-a01f-4458-8cec-ef61de241c93",
  "orgId":"ADB3LETTERSANDNUMBERS@AdobeOrg",
  "targetMigrationEnabled":true,
  "idMigrationEnabled":true
});

Request and render page-load activities

alloy("sendEvent", {
  "renderDecisions": true
});

The steps in Adobe's migration tutorial

  1. Assess your current implementation and choose an approach: the whole site at once, or page by page.
  2. Set up the initial components that connect to the Experience Platform Edge Network, including a datastream with the Adobe Target service.
  3. Replace at.js with the Web SDK and swap the prehiding snippet for the Web SDK version.
  4. Extend the implementation for your use cases: extra parameters, single-page app view changes, response tokens.
  5. Update objects in the Target interface, such as profile scripts, activities and audience definitions.
  6. Validate the final implementation before switching in production.

Related tools and pages on this site

Questions

Is the Web SDK just a newer at.js?

No. Adobe says the Web SDK is not an evolution of the at.js library. It is a separate library, alloy.js, that serves all Adobe applications with one request.

Can at.js and the Web SDK run on the same page?

Adobe says that if both libraries are used at the same time you may experience rendering and tracking issues. Run one per page, and use targetMigrationEnabled and idMigrationEnabled while different pages use different libraries.

Do we lose visitor profiles when we switch?

Adobe says the Target visitor profile lifetime is not affected by the implementation approach, and targetMigrationEnabled keeps the visitor profile when a visitor moves between at.js pages and Web SDK pages.

Does configuring the Web SDK start Target calls?

No. Adobe's tutorial notes that including and configuring the library does not make any network call. A sendEvent command does.

How do I find out which pages still load at.js?

Our tag scan reads the public pages of a site and lists at.js, its version and whether the Web SDK is also present. Your tag manager's rules are the other place to look.

Sources

Facts about Adobe's products on this page are from the linked Adobe pages, read on the date shown beside each. Explanations, steps and examples are ours unless marked as Adobe's. If Adobe's page and this one differ, Adobe's page is right.

Surge Migrate is not affiliated with Adobe and claims no Adobe partner status. Adobe product names are trademarks of Adobe.

Surge Migrate

Moving the website itself

This page answers one Adobe Target question. Surge Migrate moves a website from any CMS to any CMS. Converted automatically. Checked before you install.

  1. 1

    Scan

    Names the system behind your site, counts pages and templates, lists the blocks to build and the work no tool does, and gives an effort range with its working.

    Scan a site →
  2. 2

    Convert

    Each page becomes an Edge Delivery document, an AEM Core Component page and import files for 7 other systems. 10 pages free; 500 or 2,000 pages in one paid run.

    Convert your pages →
  3. 3

    Verify

    A download is offered only when its own format check passes. The report lists every field not found and every component kept as plain content. Compare old and new pages side by side.

    Parity check →
  4. 4

    Install

    You import with the target system's own tool, on your own environment. Each download's README gives the command. Your system changes only when you run it.

    How each import was tested →