at.js Implementation

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.

Note: Adobe Experience Manager (AEM) 6.2 with FP-11577 (or later) supports at.js implementations with its Adobe Target Cloud Services integration. For more information, see Feature Packs and Integrating with Adobe Target in the Adobe Experience Manager 6.2 documentation.

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 mboxCreate(), mboxDefine(), and 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
    Important: 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
  • No document.write() used
  • No immediate execution of JavaScript in Target responses
  • Better timeout and error handling
    • Customizable timeout per call
    • No reloads on timeouts
  • Functions designed specifically for single-page apps/MVC frameworks