Comparison of at.js to Platform Web SDK
The standalone Adobe Target at.js library differs significantly from Platform Web SDK. The following tables are a reference to help you evaluate areas of your implementation you may need to focus on during the migration process.
After reviewing the information below and assessing your current technical at.js implementation, you should be able to understand the following:
- Which Target features are supported by Platform Web SDK
- Which at.js functions have Platform Web SDK equivalents
- How Target settings are applied with Platform Web SDK
- How the data flow of at.js and Platform Web SDK differ
If you are new to Platform Web SDK, don’t worry - the items below are covered in more detail throughout this tutorial.
Feature comparison
sendEvent
command after data is retrieved from another provider.Noteworthy callouts
at-body-style
. at.js looks for this element ID to remove the style once a response is received.alloy-prehiding
. The Web SDK is not compatible with the at.js prehiding snippet so it must be changed as part of the migration process.pageLoadEnabled
is set to true
.sendEvent
command. Enabled by setting the renderDecisions
option to true
.applyOffer()
and applyOffers()
functions support setting HTML onlyapplyPropositions
command supports setting, replacing, or appending HTML for added flexibilitytrackEvent()
and sendNotifications()
functions. These functions are specific to Target and do not impact Adobe Analytics metrics.sendEvent
calls are forwarded to Target. Supplemental data needed specifically for Target should be included with the sendEvent
command with an eventType of decisioning.propositionDisplay
or decisioning.propositionInteract
to ensure Adobe Analytics metrics are not impacted.mboxDisable
, mboxDebug
, and mboxTrace
URL parameters can be used for debugging with your browser’s developer tools.The Adobe Experience Platform Debugger is also a supported debugging tool.
mboxDisable
, mboxDebug
, and mboxTrace
URL parameters are not supported.You can turn on Web SDK debugging by adding the
alloy_debug=true
to your query string or executing alloy("setDebug", { "enabled": true });
in your developer console.The Adobe Experience Platform Debugger browser extension can be used to initiate an edge trace for debugging.
Refer to the debugging the Platform Web SDK documentation for more information.
idMigrationEnabled
and targetMigrationEnabled
options to true
with the configure
command.at.js functions and Platform Web SDK equivalents
Many at.js functions have an equivalent approach using Platform Web SDK outlined in the table below. For more details about the at.js functions, refer to the Adobe Target Developer Guide.
getOffer()
and getOffers()
sendEvent
command and set the renderDecisions
option to true.To request form-based experiences or to manually render content, specify an array of
decisionScopes
(mboxes) with the sendEvent
command.applyOffer()
and applyOffers()
applyPropositions
command to apply content. You may choose to set, replace, or append HTML to a specific selector.triggerView()
web.webPageDetails.viewName
property is set under the xdm
option of the sendEvent
command.trackEvent()
and sendNotifications()
sendEvent
command with a specific eventType
set:decisioning.propositionDisplay
signals the rendering of an activitydecisioning.propositionInteract
signals a user interaction with an activity, like a mouse click.targetGlobalSettings()
targetPageParams()
and targetPageParamsAll()
xdm
option of the sendEvent
command is mapped to Target mbox parameters. Since mbox parameters are named using serialized dot notation, migrating to Platform Web SDK may require you to update existing audiences and activities to use the new mbox parameter names.Data passed as part of
data.__adobe.target
of the sendEvent
command is mapped to Target profile and Recommendations specific parameters.propositions
in the response of the sendEvent
call.at.js settings and Platform Web SDK equivalents
The at.js library can be configured and downloaded with various settings in the Target UI. These settings can also be updated with the targetGlobalSettings()
function. The table below compares these settings with those available with Platform Web SDK.
bodyHiddenStyle
prehidingStyle
with the configure
commandbodyHidingEnabled
prehidingStyle
is defined with the configure
command, then this feature is enabled. If a style is not defined, then the Platform Web SDK does not attempt to hide any content.clientCode
cookieDomain
crossDomain
thirdPartyCookiesEnabled
option to true
with the configure
command to enable first and third-party cookies for cross-domain use casescspScriptNonce
and cspStyleNonce
dataProviders
decisioningMethod
sendEvent
commands use server-side decisioning. Hybrid and on-device decisioning are not supported.defaultContentHiddenStyle
and defaultContentVisibleStyle
deviceIdLifetime
targetMigrationEnabled
is set to true
with the configure
command, the mbox
cookie is set with the device lifetime set to 2 years. This value is not configurable.enabled
globalMboxAutoCreate
renderDecisions
option to true
with the sendEvent
command to automatically fetch and render VEC-based experiences.Request a
decisionScope
for __view__
if you prefer to manually render VEC-based experiences.imsOrgId
orgId
with the configure
commandoptinEnabled
and optoutEnabled
defaultConsent
option applies to all Adobe solutions the Platform Web SDK supports.overrideMboxEdgeServer
and overrideMboxEdgeServerTimeout
pageLoadEnabled
renderDecisions
option to true
with the sendEvent
commandsecureOnly
secure
and sameSite="none"
attributes.selectorsPollingTimeout
serverDomain
edgeDomain
setting with the configure
commandtelemetryEnabled
timeout
viewsEnabled
sendEvent()
call if renderDecisions
is set to true
or the __view__
decisionScope is included in the request.visitorApiTimeout
System diagram comparison
The following diagrams should help you understand the data flow differences between a Target implementation using at.js and an implementation using the Platform Web SDK.
at.js 2.x system diagram
{modal="regular"}
Targeted content on the current page is revealed as quickly as possible without flicker of default content.
Targeted content for future views of a single-page application is cached in the browser, so it can be instantly applied without an extra server call when the views are triggered.
Refer to the developer guide for more information how to implement Target using at.js for single-page applications.
Platform Web SDK system diagram
b. Personalized content for views that are shown as a result of user actions in a Single Page Application (SPA) is cached for instant rendering without additional server calls.
c. The edge network sends the Visitor ID and other values in cookies (for example consent, Session ID, identity, cookie check, personalization, and so forth).
Refer to the developer guide for more information how to implement Target using the Platform Web SDK for Single-page applications.
After you have a good technical understanding of your current Target implementation and the features you use, the next step is to perform the initial setup.