The at.js library is a new implementation library for Adobe Target designed for both typical web implementations and single-page applications.
Among other benefits, at.js improves page-load times for web implementations and provides better implementation options for single-page applications.
at.js replaces mbox.js for Target implementations. The at.js library also includes the components that were included in target.js, so there is no longer a call to target.js.
The following table explains the differences between the two libraries:
|at.js||at.js replaces mbox.js for Target implementations.
Among other benefits, at.js improves page-load times for web implementations, improves security, prevents document.write warnings in Google Chrome, and provides better implementation options for single-page applications.
For more information, see at.js Implementation.
|mbox.js||Prior to Target 16.3.1 (March 2016), Target required a call to mbox.js to create the global mbox required for Target to deliver activities, track clicks, and track most success metrics. This file contains the libraries needed for all of your activities. You do not need to maintain different activity-specific versions of the file.
If you already have wrapping mboxes on your pages from an older style of Target implementation, these mboxes can still be used in the new interface. The updated mbox.js file is still required, but these mboxes can be selected for activities and edited using the Visual Experience Composer.
Target Standard and Premium update and supplement mbox.js with a reference to a target.js file. The target.js file is hosted by Adobe. The Target.js file makes it possible to edit content on any page using the Visual Experience Composer, even if the page does not contain predefined mboxes. You must reference this file on every page on your site.
For more information, see mbox.js Implementation.
Important: The mbox.js library is still supported, but there will be no feature updates. All customers should migrate to at.js. For more information, see Migrate to at.js from mbox.js
To use at.js, replace the mbox.js reference on pages where you want to implement it. You cannot use both mbox.js and at.js on a single page. However, you can use either on each page on your site.
The at.js library works for existing implementations using the
mboxUpdate() functions and supports new functionality focused on single-page-app based implementations.
You can use at.js anywhere you currently use mbox.js.
The at.js library offers several improvements over the mbox.js library, including:
Completely asynchronous communication via cross domain AJAX
Although at.js communicates with the Target servers asynchronously, the at.js file itself must load synchronously in the
<head> section of your page. Ideally, it should be one of the first scripts loaded. Once loaded, at.js executes mbox calls asynchronously through
XMLHttpRequest, and does not block page rendering.
No more blocking calls
Better timeout and error handling
Functions designed specifically for single-page apps/MVC frameworks
This video is a recording of " Office Hours," an initiative led by the Adobe Customer Care team.