at.js functions

List of functions that can be used with the Adobe Target at.js JavaScript library. Click the links in the Function column for more information and examples.

Function
Details
adobe.target.getOffer(options)
This function fires a request to get a Target offer. Use with adobe.target.applyOffer() to process the response or use your own success handling.

adobe.target.getOffers(options)

(at.js 2.x)

This function lets you retrieve multiple offers by passing in multiple mboxes. Additionally, multiple offers can be retrieved for all views in active activities.

Note: This function was introduced with at.js 2.x. This function is not available for at.js version 1.x.

adobe.target.applyOffer(options)
This function is for applying the response content.

adobe.target.applyOffers(options)

(at.js 2.x)

This function lets you apply more than one offer that was retrieved by adobe.target.getOffers().

Note: This function was introduced with at.js 2.x. This function is not available for at.js version 1.x.

adobe.target.triggerView (viewName, options)

(at.js 2.x)

This function can be called whenever a new page is loaded or when a component on a page is re-rendered.

This function should be implemented for single page applications (SPAs) in order to use the Visual Experience Composer (VEC) to create A/B Test and Experience Targeting (XT) activities.

adobe.target.trackEvent(options)
This function fires a request to report user actions, such as clicks and conversions. It does not deliver activities in the response.

mboxCreate(mbox,params)

(at.js 1.x)

Executes a request and applies the offer to the closest DIV with mboxDefault class name.

Note: This function is available for at.js versions 1.x only. This function was deprecated with the release of at.js 2.x. This function returns default content if used with at.js 2.x.

mboxDefine(options) and mboxUpdate(options)

(at.js 1.x)

Define and update an mbox.

Note: This function is available for at.js versions 1.x only. This function was deprecated with the release of at.js 2.x. This function returns default content if used with at.js 2.x.

targetGlobalSettings(options)

You can override settings in the at.js library using targetGlobalSettings(), rather than configuring them in the Target Standard/Premium UI or by using REST APIs.

  • Data Providers: This setting lets customers gather data from third-party data providers, such as Demandbase, BlueKai, and custom services, and pass the data to Target as mbox parameters in the global mbox request.
targetPageParams(options)
This method allows you to attach parameters to the global mbox from outside of the request code.
targetPageParamsAll(options)
This method allows you to attach parameters to all mboxes from outside of the request code.

registerExtension(options)

(at.js 1.x)

Provides a standard way to register a specific extension.

Note: This function is available for at.js versions 1.x only. This function was deprecated with the release of at.js 2.x. This function returns default content if used with at.js 2.x.

at.js custom events
at.js custom events let you know when an mbox request or offer fails or succeeds.

adobe.target.sendNotifications(options)

(at.js 2.1.0)

This function sends a notification to Target edge when an experience is rendered without using adobe.target.applyOffer() or adobe.target.applyOffers().

Note: This function has been introduced in at.js 2.1.0 and will be available for any versions above 2.1.0.

recommendation-more-help
6906415f-169c-422b-89d3-7118e147c4e3